[
https://issues.apache.org/jira/browse/VCL-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693651#comment-14693651
]
ASF subversion and git services commented on VCL-896:
-----------------------------------------------------
Commit 1695554 from [~arkurth] in branch 'vcl/trunk'
[ https://svn.apache.org/r1695554 ]
VCL-871
Updated OS.pm::create_text_file to ensure that text is added on a new line at
the end of the file if called with the $append flag. This subroutine should
correctly add newlines when necessary. Callers of append_text_file (which calls
create_text_file) should not have to ensure a trailing newline exists in the
string passed.
Removed trailing newline from the AllowUsers line appended to
external_sshd_config in Linux.pm::grant_connect_method_access. It should no
longer be needed.
Updated OS.pm::set_vcld_post_load_status to use create_text_file instead of
echo.
VCL-896
Reworked and cleaned up Linux.pm::update_public_hostname. Added call to
hostnamectl. Removed Linux.pm::update_hostname_file which was using sed and
echo instead of create_text_file.
VCL-897
Changed argument accepted by Linux.pm::grant_root_access to a simple string.
Changed Linux.pm::create_user to only call grant_root_access if necessary.
Other
Added Linux.pm::install_package. This isn't currently being called but may be
used in the future.
> Improve method to set Linux hostname
> ------------------------------------
>
> Key: VCL-896
> URL: https://issues.apache.org/jira/browse/VCL-896
> Project: VCL
> Issue Type: Improvement
> Components: vcld (backend)
> Reporter: Andy Kurth
> Assignee: Andy Kurth
> Fix For: 2.5
>
>
> The {{Linux.pm::update_public_hostname}} subroutine was reworked for VCL 2.4
> via [VCL-637|https://issues.apache.org/jira/browse/VCL-637]. A
> {{Linux.pm::update_hostname_file}} subroutine was added to update the
> _/etc/hostname_ file if it exists, as is the case with CentOS 7. This
> subroutine is using the echo command to create the file. It would be better
> us use {{OS.pm::create_text_file}} for consistency.
> Another improvement would be to check if the _hostnamectl_ utility exists on
> the OS. If so, use it to set the hostname instead of using the _hostname_
> command.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)