/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 e1c5d4b..cffba6b 100644
--- a/mllib/hostname.ml
+++ b/mllib/hostname.ml
@@ -79,7 +79,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
--
1.8.3.1