2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

enhance confignetwork -s return code (#4789)

* enhance confignetwork -s return code

* restart nic when updatenode and postbootscripts

* enhance >/dev/null 2>&1

* polished
This commit is contained in:
Yuan Bai 2018-02-06 14:57:54 +08:00 committed by yangsong
parent 64773c84ec
commit cb9ac0d4fb
3 changed files with 5 additions and 3 deletions

View File

@ -640,7 +640,9 @@ elif [ "$1" = "-s" ];then
fi
fi
ifdown $str_inst_nic;ifup $str_inst_nic
if [ "$UPDATENODE" = "1" ] || grep "REBOOT=TRUE" /opt/xcat/xcatinfo >/dev/null 2>&1; then
ifdown $str_inst_nic;ifup $str_inst_nic
fi
if [ $? -ne 0 ]; then
log_error "ifup $str_inst_nic failed."
error_code=1

View File

@ -632,7 +632,7 @@ if [ $boot_install_nic -eq 1 ];then
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
log_info "configure the install nic $installnic. "
instnic_conf=1
configeth -s $installnic |log_lines info
configeth -s $installnic
if [ $? -ne 0 ]; then
errorcode=1
fi

View File

@ -77,7 +77,7 @@ function log_lines {
function log_error {
local __msg="$*"
$log_print_cmd $log_print_arg "[E]:Error: $__msg"
return 0
return 1
}
######################################################