From d6f736ab1836d84f329b3fa2af8b7685b4b85dde Mon Sep 17 00:00:00 2001 From: Wanlong Gao Date: Wed, 29 Feb 2012 14:37:37 +0800 Subject: [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 --- clone/virt-sysprep.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in index 833a31deb..d50553274 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 () {