[prev in list] [next in list] [prev in thread] [next in thread]
List: libguestfs
Subject: Re: [Libguestfs] [PATCH] virt-sysprep: add the hostname and net_hwaddr support for rhel
From: "Richard W.M. Jones" <rjones () redhat ! com>
Date: 2012-02-29 10:11:57
Message-ID: 20120229101157.GC27709 () amd ! home ! annexia ! org
[Download RAW message or body]
On Wed, Feb 29, 2012 at 02:37:37PM +0800, Wanlong Gao wrote:
> Add the support for rhel.
> Change the hostname and delete the HWADDR for rhel.
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> clone/virt-sysprep.in | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
> index 833a31d..d505532 100644
> --- a/clone/virt-sysprep.in
> +++ b/clone/virt-sysprep.in
> @@ -273,7 +273,7 @@ fi
>
> if [ "$hostname" = "yes" ]; then
> case "$type/$distro" in
> - linux/fedora)
> + linux/fedora|linux/rhel)
> echo "HOSTNAME=$hostname_param" > $mnt/etc/sysconfig/network.new
> sed '/^HOSTNAME=/d' < $mnt/etc/sysconfig/network >> $mnt/etc/sysconfig/network.new
> mv -f $mnt/etc/sysconfig/network.new $mnt/etc/sysconfig/network
> @@ -313,7 +313,7 @@ fi
>
> if [ "$net_hwaddr" = "yes" ]; then
> case "$type/$distro" in
> - linux/fedora)
> + linux/fedora|linux/rhel)
> if [ -d $mnt/etc/sysconfig/network-scripts ]; then
> rm_hwaddr ()
> {
Thanks - I've pushed it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic