From a954d6d2f296aaf0e7e12342c9909c5bb4f704e5 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 19 Oct 2017 23:25:52 -0400 Subject: [PATCH] fix issue --- xCAT/postscripts/xcatinstallpost | 5 ++++- xCAT/postscripts/xcatpostinit1.install | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index 4fcdd284d..8ce267048 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -89,7 +89,10 @@ else sed -i "/SERVICEGROUP=.*/d" $XCATINFOFILE fi -CNS=`grep NODESTATUS= /xcatpost/mypostscript.post |awk -F = '{print $2}' | tr -d \'\" | tr A-Z a-z` +[ -f /xcatpost/mypostscript ] && NODESTATUS=`grep 'NODESTATUS=' /xcatpost/mypostscript |awk -F = '{print $2}'|tr -d \'\" | tr A-Z a-z ` +[ -z "$NODESTATUS" ] && NODESTATUS="1" + +CNS=$NODESTATUS if [ -z "$CNS" ] || [[ "$CNS" =~ ^(1|yes|y)$ ]]; then #update the node status during the postbootscript running #TMP=`sed "/postbootscripts-start-here/ i\updateflag.awk \\$MASTER 3002 \\"installstatus configuring\\"" /xcatpost/mypostscript.post` diff --git a/xCAT/postscripts/xcatpostinit1.install b/xCAT/postscripts/xcatpostinit1.install index 6a42d5e15..96fd3f72e 100755 --- a/xCAT/postscripts/xcatpostinit1.install +++ b/xCAT/postscripts/xcatpostinit1.install @@ -23,6 +23,7 @@ fi [ -f /opt/xcat/xcatinfo ] && XCATSERVER=`grep 'XCATSERVER' /opt/xcat/xcatinfo |cut -d= -f2 | tr -d \'\" ` [ -f /xcatpost/mypostscript ] && NODESTATUS=`grep 'NODESTATUS=' /xcatpost/mypostscript |awk -F = '{print $2}'|tr -d \'\" | tr A-Z a-z ` +[ -z "$NODESTATUS" ] && NODESTATUS="1" [ -f /xcatpost/mypostscript ] && RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript |awk -F = '{print $2}' | tr -d \'\" | tr A-Z a-z ` case $1 in