fix defect #4539 [FVT] On RHEL 7.1 ppc64, the name of network adapters changed after the operating system

This commit is contained in:
immarvin 2015-03-04 01:23:52 -08:00
parent 32753450ae
commit 147185c198
2 changed files with 10 additions and 0 deletions

View File

@ -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

View 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