2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

Merge pull request #688 from bybai/confignetworknew

Fix github issue #630, only the nictypes of the first lower interface is checked
This commit is contained in:
neo954
2016-02-23 15:44:26 +08:00

View File

@ -249,11 +249,22 @@ function sort_nics_device_order {
#find nicdevice type as base_nic_type
base_nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $2}'`
if echo "$base_nic_dev"|grep "@" >/dev/null; then
temp_base_nic_dev=`echo $base_nic_dev|awk -F@ '{print $1}'`
for i in `echo "$base_nic_dev" |sed 's/@/ /g'`
do
temp_base_nic_type=`find_nic_type "$i"`
if [ x"$temp_base_nic_type_one" = x ]; then
temp_base_nic_type_one=$temp_base_nic_type
elif [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then
log_error "different nic device types in $base_nic_dev."
break 2
fi
done
else
temp_base_nic_dev=$base_nic_dev
temp_base_nic_type=`find_nic_type "temp_base_nic_dev"`
fi
base_nic_type=`find_nic_type "$temp_base_nic_dev"`
base_nic_type=$temp_base_nic_type
nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $1}'`
nic_dev_type=`find_nic_type "$nic_dev"`