From 36dda35ce0147f6fdf788132606f3b81a4a096a4 Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 17 Sep 2012 11:12:39 +0000 Subject: [PATCH] corrected the issue that PBS cannot run in first boot after installation git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13829 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/install/scripts/post.xcat | 2 +- xCAT/postscripts/xcatinstallpost | 3 +++ xCAT/postscripts/xcatpostinit1 | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 1a387e13e..f90ae9442 100644 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -68,7 +68,7 @@ do sleep $RAND done echo "INSTALLDIR=$INSTALLDIR" >> /opt/xcat/xcatinfo -echo "REBOOT=TRUE" >> /opt/xcat/xcatinfo +#echo "REBOOT=TRUE" >> /opt/xcat/xcatinfo cd /xcatpost #gunzip xcatpost.tar.gz #tar -xvf xcatpost.tar diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index 26eb1b628..54a092bdc 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -34,6 +34,9 @@ fi DHCP_TMP=`sed 's/\(DHCPINTERFACES=\)\(.*\)$/\1"\2"/' /xcatpost/mypostscript.post` echo "$DHCP_TMP" > /xcatpost/mypostscript.post +#mark that the first reboot after installation is finished +echo "REBOOT=TRUE" >> /opt/xcat/xcatinfo + CNS=`grep NODESTATUS= /xcatpost/mypostscript.post |awk -F = '{print $2}'` if [ -z "$CNS" ] || [ "$CNS" != "'0'" -a "$CNS" != "'N'" -a "$CNS" != "'n'" ]; then #update the node status during the postbootscript running diff --git a/xCAT/postscripts/xcatpostinit1 b/xCAT/postscripts/xcatpostinit1 index 8b630fc9a..b80726505 100755 --- a/xCAT/postscripts/xcatpostinit1 +++ b/xCAT/postscripts/xcatpostinit1 @@ -36,10 +36,8 @@ start) REBOOT=`grep 'REBOOT' /opt/xcat/xcatinfo |cut -d= -f2` fi # if the xcatdsklspost file exists and this is a reboot - run xcatdsklspost with a mode of 6 - if [ -r /opt/xcat/xcatdsklspost ]; then - if [ "$REBOOT" = "TRUE" ]; then + if [ "$REBOOT" = "TRUE" -a -r /opt/xcat/xcatdsklspost ]; then /opt/xcat/xcatdsklspost 6 - fi else # run /opt/xcat/xcatinstallpost if [ -r /opt/xcat/xcatinstallpost ]; then