search for: e1c5d4b

Displaying 2 results from an estimated 2 matches for "e1c5d4b".

2014 Feb 12
1
[PATCH 2/2] 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 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 ^ "...
2014 Feb 12
2
[PATCH 1/2] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
...b/Makefile.am @@ -80,10 +80,10 @@ OBJECTS = \ common_utils.cmx \ urandom.cmx \ random_seed.cmx \ + perl_edit.cmx \ hostname.cmx \ timezone.cmx \ firstboot.cmx \ - perl_edit.cmx \ tTY.cmx \ fsync.cmx \ progress.cmx \ diff --git a/mllib/hostname.ml b/mllib/hostname.ml index 6702f29..e1c5d4b 100644 --- a/mllib/hostname.ml +++ b/mllib/hostname.ml @@ -42,7 +42,12 @@ let rec set_hostname (g : Guestfs.guestfs) root hostname = true | "linux", ("debian"|"ubuntu"), _ -> + let old_hostname = read_etc_hostname g in update_etc_hostname g hostnam...