From bed877bd505e78a822c68e61d267b73c30bfcbe0 Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 8 Mar 2010 20:54:06 +0000 Subject: [PATCH] fix node status and updatenode for statelite git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5409 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcatdsklspost | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 49959475d..65c4c99a1 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -262,7 +262,7 @@ done #save the MASTER into the xcatinfo file for node deployment case, #for updatenode case, only save it when -M is specified -if [ $argnum -eq 0 ]; then +if [ $argnum -eq 0 ] || [ "$MODE" == "4" ]; then new_ms=`grep '^MASTER' /tmp/mypostscript |cut -d= -f2` fi if [ -n "$new_ms" ]; then @@ -281,7 +281,7 @@ fi # when called by the updatenode command #modify the UPDATENODE flag to 1 -if [ $argnum -gt 0 ]; then +if [ $argnum -gt 0 ] && [ "$MODE" != "4" ]; then TMP=`sed -e 's/UPDATENODE=0/UPDATENODE=1/g' /tmp/mypostscript`; echo "$TMP" > /tmp/mypostscript; fi @@ -332,7 +332,7 @@ echo "$TMP" >> /tmp/mypostscript TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /tmp/mypostscript` echo "$TMP" > /tmp/mypostscript -if [ $argnum -eq 0 ]; then +if [ $argnum -eq 0 ] || [ "$MODE" == "4" ]; then #notify the server that we are done with netbooting CNS=`grep NODESTATUS= /tmp/mypostscript |awk -F = '{print $2}'` if [ -z "$CNS" ] || [ "$CNS" != "'0'" -a "$CNS" != "'N'" -a "$CNS" != "'n'" ]; then @@ -349,8 +349,13 @@ if [ -x /tmp/mypostscript ];then fi #rm -f /tmp/mypostscript +#unmount the /xcatpost for statelite deployment case so that updatenode will work later +if [ "$MODE" == "4" ]; then + umount -l /xcatpost +fi + #tell user it is done when this is called by updatenode command -if [ $argnum -gt 0 ]; then +if [ $argnum -gt 0 ] && [ "$MODE" != "4" ]; then echo "returned from postscript" fi