search for: read_etc_hostname

Displaying 7 results from an estimated 7 matches for "read_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).
...ib/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 hostname; + (match old_hostname with + | Some old_hostname -> replace_host_in_etc_hosts g old_hostname hostname + | None -> () + ); true | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux&quo...
2014 Feb 13
2
[PATCH] mllib: hostname: replace the hostname on Debian also in /etc/hosts (RHBZ#953907).
...ib/hostname.ml b/mllib/hostname.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&quo...
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.
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
...rec set_hostname (g : Guestfs.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 = |...
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