fix defect #4539 [FVT] On RHEL 7.1 ppc64, the name of network adapters changed after the operating system
This commit is contained in:
parent
32753450ae
commit
147185c198
@ -151,4 +151,5 @@ reboot
|
||||
%end
|
||||
%post
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels7#
|
||||
%end
|
||||
|
9
xCAT-server/share/xcat/install/scripts/post.rhels7
Normal file
9
xCAT-server/share/xcat/install/scripts/post.rhels7
Normal file
@ -0,0 +1,9 @@
|
||||
#the nic name might change between the installation and 1st boot
|
||||
#active all the nics with network link during system boot
|
||||
for i in $(find /etc/sysconfig/network-scripts/ifcfg-*|egrep -v ifcfg-lo )
|
||||
do
|
||||
nicname=$(echo $i|awk -F 'ifcfg-' '{print $2}')
|
||||
if ethtool $nicname|grep -E -i "Link detected.*yes" >/dev/null 2>&1
|
||||
then sed -i 's/ONBOOT=no/ONBOOT=yes/' $i
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user