search for: update_etc_hostnam

Displaying 9 results from an estimated 9 matches for "update_etc_hostnam".

Did you mean: update_etc_hostname
2014 Feb 13
2
Re: [PATCH] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
On Thursday 13 February 2014 13:33:16 Richard W.M. Jones wrote: > On Thu, Feb 13, 2014 at 02:15:31PM +0100, Pino Toscano wrote: > > + let expr = "/files/etc/hosts/*[label() != '#comment']/*[label() > > != 'ipaddr'][. = '" ^ oldhost ^ "']" in > Quoting? If oldhost contains a ' character + some Augeas code, this > might be
2014 Feb 12
2
[PATCH 1/2] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
...ame.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 hostname; + (match old_hostname with + | Some old_hostname -> replace_host_in_etc_hosts g old_hostname hostname + | None -> () + ); true | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"redhat-based"),...
2014 Feb 12
1
[PATCH 2/2] mllib: hostname: add a newline in /etc/hostname
...ib/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
2014 Feb 13
2
[PATCH] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
...ame.ml index fce16ff..0d5b5d4 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 hostname; + (match old_hostname with + | Some old_hostname -> replace_host_in_etc_hosts g old_hostname hostname + | None -> () + ); true | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"redhat-based"),...
2018 Feb 12
2
[PATCH] inspect: recognize the Kali Linux distribution (RHBZ#1544227)
Read the information from os-release, and make it behave like a Debian distribution (i.e. using dpkg, and apt). --- daemon/inspect_fs.ml | 2 ++ daemon/inspect_fs_unix.ml | 1 + daemon/inspect_types.ml | 2 ++ daemon/inspect_types.mli | 1 + generator/actions_inspection.ml | 4 ++++ 5 files changed, 10 insertions(+) diff --git a/daemon/inspect_fs.ml
2018 Feb 12
0
[PATCH] customize, sysprep, v2v: handle Kali Linux as Debian
...s.guestfs) root hostname = update_etc_machine_info g hostname; true - | "linux", ("debian"|"ubuntu"), _ -> + | "linux", ("debian"|"ubuntu"|"kalilinux"), _ -> let old_hostname = read_etc_hostname g in update_etc_hostname g hostname; replace_host_in_etc_hosts g old_hostname hostname; diff --git a/customize/password.ml b/customize/password.ml index 2d737bf08..489096aeb 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -165,7 +165,7 @@ and default_crypto g root = | ("opensuse"|"...
2016 Sep 01
2
[PATCH 0/2] customize: Fix hostname setting in Debian/Ubuntu.
https://bugzilla.redhat.com/show_bug.cgi?id=1372269 It was fairly broken. This fixes it -- except on Ubuntu 10.04 -- and adds a slow test. Rich.
2014 Mar 18
2
[PATCH] customize: Move virt-customize-related code to a separate
There's not going to be an easy way to present this patch. It's huge and interconnected. Anyway, what it does is lay the groundwork for a new tool which I'm calling 'virt-customize'. virt-customize is virt-builder, but without the part where it downloads a template from a respository. Just the part where it customizes the template, that is, installing packages, editing
2017 Aug 01
2
[PATCH] Add missing oraclelinux cases.
...true - | "linux", ("rhel"|"centos"|"scientificlinux"|"redhat-based"), v + | "linux", ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), v when v >= 7 -> update_etc_hostname g hostname; update_etc_machine_info g hostname; @@ -48,7 +48,7 @@ let rec set_hostname (g : Guestfs.guestfs) root hostname = replace_host_in_etc_hosts g old_hostname hostname; true - | "linux", ("fedora"|"rhel"|"centos"|"scientificlinu...