From 5467f1ed24a2d5f27afe5c980a72d08d550692bb Mon Sep 17 00:00:00 2001 From: ligc Date: Wed, 25 Jun 2014 14:42:07 -0500 Subject: [PATCH] fix for bug 4177: rhel7 uses interface names ethp1s2/enp1s2 --- xCAT/postscripts/confignics | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics index e1dc2380f..fe9825557 100755 --- a/xCAT/postscripts/confignics +++ b/xCAT/postscripts/confignics @@ -186,7 +186,7 @@ if [ "$str_temp" = "mac" ];then else str_inst_nic=`ip -o link | grep -i "$MACADDRESS" | awk '{print $2;}' | sed s/://` fi -elif [ `echo $str_temp | grep -E "e(n|th)[0-9]+"` ];then +elif [ `echo $str_temp | grep -E "e(n|th)[0-9a-z]+"` ];then str_inst_nic=$str_temp fi @@ -229,7 +229,7 @@ if [ $bool_remove -eq 1 ];then for str_temp_nic in ${array_nics_temp[@]} do #the nic type should be ethernet - echo $str_temp_nic | grep -E "e(n|th)[0-9]+" + echo $str_temp_nic | grep -E "e(n|th)[0-9a-z]+" if [ $? -ne 0 ];then continue fi @@ -284,7 +284,7 @@ do echo "confignics on $NODE: processing custom scripts: ${array_temp[1]} for interface $key" ${array_temp[1]} else - if [ `echo $key | grep -E '(eth|en)[0-9]+'` ];then + if [ `echo $key | grep -E 'e(n|th)[0-9a-z]+'` ];then str_nic_type="ethernet" elif [ `echo $key | grep -E 'ib[0-9]+'` ];then str_nic_type="infiniband"