From 71ed00d1a4bda588ec6795adae251783e81fd9e0 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 29 Apr 2014 00:18:59 -0700 Subject: [PATCH] fix defect #3997 node reinstall loop when site.nodestatus=0 Edit --- xCAT-server/share/xcat/install/scripts/post.xcat | 7 ++++--- xCAT/postscripts/runxcatpost | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 50c298e51..61dbd8379 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -182,9 +182,10 @@ addsiteyum /xcatpost/mypostscript sed -i 's/^serial/#serial/' /boot/grub/grub.conf sed -i 's/^terminal/#terminal/' /boot/grub/grub.conf -if [ -z "$NODESTATUS" ] || [ "$NODESTATUS" != "0" -a "$NODESTATUS" != "N" -a "$NODESTATUS" != "n" ]; then - updateflag.awk $MASTER 3002 -fi + +#the following command should always be run to prevent infinite installation loops +updateflag.awk $MASTER 3002 + cd / #rm -Rf /xcatpost #rm -f /xcatpost/mypostscript diff --git a/xCAT/postscripts/runxcatpost b/xCAT/postscripts/runxcatpost index 83284ca55..508c13f14 100644 --- a/xCAT/postscripts/runxcatpost +++ b/xCAT/postscripts/runxcatpost @@ -68,6 +68,4 @@ echo "$TMP" > /tmp/xcatenv . /tmp/xcatenv /xcatpost/addsiteyum -if [ -z "$NODESTATUS" ] || [ "$NODESTATUS" != "0" -a "$NODESTATUS" != "N" -a "$NODESTATUS" != "n" ]; then - /xcatpost/updateflag.awk $MASTER 3002 -fi +/xcatpost/updateflag.awk $MASTER 3002