mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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>
This commit is contained in:
committed by
Richard W.M. Jones
parent
48a5cb2a2c
commit
d6f736ab18
@@ -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 ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user