diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index ab4a9b4ba..ca2273f37 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -81,7 +81,6 @@ function get_nic_cfg_file_content { boot_install_nic=0 str_ib_nics='' num_iba_ports= -ignore_nicips=0 for arg in "$@" do if [ "$arg" = "-s" ];then @@ -89,10 +88,6 @@ do elif [ "${arg:0:10}" = "--ibaports" ];then num_iba_ports=${arg#--ibaports=} fi - # --allownoip means ignore if nicips are not configured or not - if [ "$arg" = "--allownoip" ]; then - ignore_nicips=1 - fi done if [ "$SETINSTALLNIC" = "1" ] || [ "$SETINSTALLNIC" = "yes" ]; then bool_install_nic=1 @@ -341,8 +336,8 @@ function sort_nics_device_order { echo $alonenic fi else - if [ $ignore_nicips -eq 1 ] && [ -z "$alonenicips" ]; then - echo "nic $alonenic found, but incomplete configuration in node definition." + if [ -n "$alonenictype" ] && [ $alonenictype = "unused" ]; then + echo "nic $alonenic found, but nictypes.$alonenic=unused, ignore configuring $alonenic." else errorcode=1 echo "Error: nicips,nictypes and nicnetworks should be configured in nics table for $alonenic." @@ -671,14 +666,14 @@ if [ $? -eq 0 ]; then errorcode=1 fi -#when --allownoip is used, print incomplete nics -nonicips_list=`echo "$sorted_nicdevice_list" | grep "incomplete"` +#when nictypes=unused, print unused nics +nonicips_list=`echo "$sorted_nicdevice_list" | grep "unused"` if [ $? -eq 0 ]; then echo "$nonicips_list"| log_lines info fi #delete invalid nics device pair based on Error -valid_sorted_nicdevice_list=`echo "$sorted_nicdevice_list" | sed '/Error/d' | sed '/incomplete configuration/d'` +valid_sorted_nicdevice_list=`echo "$sorted_nicdevice_list" | sed '/Error/d' | sed '/unused/d'` if [ -n "$valid_sorted_nicdevice_list" ]; then log_info "All valid nics and device list:" echo "$valid_sorted_nicdevice_list" |log_lines info