diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 057f25ccf..3440250cd 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -285,6 +285,41 @@ else esac fi +# The cheat sheet for ${MODE} +# Empty +# node deployment +# 1 - updatenode -P +# Execute postscripts listed in the postscripts table or parameters +# 2 - updatenode -S +# Perform Software Maintenanc - updatenode -S +# 3 - moncfg rmcmon +# Obsoleted +# 4 +# Statelite mode +# 5 +# Update security +# 6 - xcatpostinit1 +# During node reboot +case "${MODE}" in +"1"|"2"|"5") + # The cheat sheet for checkservicestatus + # Return code + # 0 - active + # 1 - inactive + # 2 - failed + # 3 - others + # 17 - activating + # 127 - error + checkservicestatus xcatpostinit1 >/dev/null 2>&1 + case "$?" in + "17") + echolog "warning" "xCAT post-booting process is not completed yet. Abort. Please try later." + exit 255 + ;; + esac + ;; +esac + update_VPD() { if [ -f /usr/sbin/vpdupdate ]; then diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh index e7b059494..4c3cf0210 100755 --- a/xCAT/postscripts/xcatlib.sh +++ b/xCAT/postscripts/xcatlib.sh @@ -317,7 +317,7 @@ function servicemap { #all the service unit files are placed under /lib/systemd/system/ on ubuntu #all the service unit files are placed under /usr/lib/systemd/system/ on redhat and sles #path should be delimited with space - path="/usr/lib/systemd/system/ /lib/systemd/system/" + path="/usr/lib/systemd/system/ /lib/systemd/system/ /etc/systemd/system/" postfix=".service" svcmgrcmd="systemctl" elif [ "$svcmgrtype" = "2" ];then @@ -549,6 +549,8 @@ function checkservicestatus { retcode=1 elif echo $output|grep -E -i "^failed$";then retcode=2 + elif echo $output|grep -E -i "^activating$";then + retcode=17 fi elif [ -n "$svcjob" ];then output=$(initctl status $svcjob)