summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWanlong Gao <gaowanlong@cn.fujitsu.com>2012-02-29 14:37:37 +0800
committerRichard W.M. Jones <rjones@redhat.com>2012-02-29 10:11:37 +0000
commitd6f736ab1836d84f329b3fa2af8b7685b4b85dde (patch)
tree4080b0b9eea969ae01463fb797542954c1636c70
parent48a5cb2a2c150ad74203479d3f96a8066241d309 (diff)
downloadlibguestfs-d6f736ab1836d84f329b3fa2af8b7685b4b85dde.tar.gz
libguestfs-d6f736ab1836d84f329b3fa2af8b7685b4b85dde.tar.xz
libguestfs-d6f736ab1836d84f329b3fa2af8b7685b4b85dde.zip
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>
-rw-r--r--clone/virt-sysprep.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index 833a31de..d5055327 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 ()
{