2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #2546 from stanford-rc/confignics_r_fix

confignics: fix regexp for Ethernet checks
This commit is contained in:
Yuan Bai 2017-02-27 13:36:07 +08:00 committed by GitHub
commit 0051e96558

View File

@ -202,7 +202,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-9a-z]+"` ];then
elif [ `echo $str_temp | grep -E "e(n|th|m)[0-9a-zA-Z]+"` ];then
str_inst_nic=$str_temp
fi
@ -247,7 +247,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-9a-z]+"
echo $str_temp_nic | grep -E "e(n|th|m)[0-9a-zA-Z]+"
if [ $? -ne 0 ];then
continue
fi