mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	confignics: fix regexp for Ethernet checks
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user