[PATCH] virt-sysprep: add the hostname and net_hwaddr support for rhel
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 () { -- 1.7.9
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
participants (2)
-
Richard W.M. Jones -
Wanlong Gao