mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
mllib: hostname: add a newline in /etc/hostname
/etc/hostname usually has an ending newline, so add it when changing it.
This commit is contained in:
@@ -74,7 +74,7 @@ and replace_line_in_file g filename key value =
|
||||
g#write filename content
|
||||
|
||||
and update_etc_hostname g hostname =
|
||||
g#write "/etc/hostname" hostname
|
||||
g#write "/etc/hostname" (hostname ^ "\n")
|
||||
|
||||
and update_etc_machine_info g hostname =
|
||||
replace_line_in_file g "/etc/machine-info" "PRETTY_HOSTNAME" hostname
|
||||
|
||||
Reference in New Issue
Block a user