[Pkg-libvirt-commits] [libguestfs] 200/233: mllib: hostname: add a newline in /etc/hostname

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:12:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 3d4cc3cf576c5bf6105f5693eda87e5c6f775f5e
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Wed Feb 12 15:12:19 2014 +0100

    mllib: hostname: add a newline in /etc/hostname
    
    /etc/hostname usually has an ending newline, so add it when changing it.
---
 mllib/hostname.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mllib/hostname.ml b/mllib/hostname.ml
index 6702f29..fce16ff 100644
--- a/mllib/hostname.ml
+++ b/mllib/hostname.ml
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list