diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index 8e1fa0551..74e6131ce 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -573,18 +573,16 @@ function create_persistent_ifcfg { attrs=${attrs}${attrs:+,}"${name}=${value}" i=$((i+1)) done - # record manual and auto attributes first # since input attributes might overwrite them. # - # record input attributes later. They will overwrite + # record extra attributes later. They will overwrite # previous generated attributes if duplicate. [ -f $fcfg ] && mv -f $fcfg `dirname $fcfg`/.`basename $fcfg`.bak - echo "$attrs,$inattrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ + echo "$inattrs,$attrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ | $sed -e 's/=/="/' -e 's/ *$/"/' \ | uniq_per_key -t'=' -k1 >$fcfg local rc=$? - # log for debug echo "['ifcfg-${ifname}']" >&2 cat $fcfg | $sed -e 's/^/ >> /g' | log_lines info diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh index e8f9859ab..e1c688402 100755 --- a/xCAT/postscripts/xcatlib.sh +++ b/xCAT/postscripts/xcatlib.sh @@ -733,7 +733,7 @@ function parse_nic_extra_params() { do token2="${params_temp[$k]}" array_extra_param_names[$k]=`echo "$token2" | cut -d'=' -f 1` - array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2` + array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2-` k=$((k+1)) done }