From 6e115c511a0183c0fcfd26783b813d8d085d79c8 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 12 Oct 2012 13:47:41 +0000 Subject: [PATCH] Make tolerant of new mypostscript format git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13999 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcatdsklspost | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index ef9469ea0..a1d918c72 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -384,17 +384,17 @@ fi #when a diskfull reboot mode if [ "$MODE" = "6" ]; then # remove the post scripts so that they are not run on reboot - TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" /xcatpost/mypostscript` + TMP=`sed "/# postscripts-start-here/,/# postscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript # get the RUNBOOTSCRIPTS site variable if [ -f /xcatpost/mypostscript ]; then RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript |cut -d= -f2` fi - # if admdin did not requested running of post boot scripts - then remove PBS + # if admin did not requested running of post boot scripts - then remove PBS if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then #remove all the postscripts - TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /xcatpost/mypostscript` + TMP=`sed "/# postbootscripts-start-here/,/# postbootscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript #TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /xcatpost/mypostscript.post` @@ -405,10 +405,10 @@ fi # postscript name is specified with the updatenode if [ "XX$POSTSCRIPTS" != "XX" ]; then #remove all the postbootscripts - TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /xcatpost/mypostscript` + TMP=`sed "/# postbootscripts-start-here/,/# postbootscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript #remove all the postscripts - TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" /xcatpost/mypostscript` + TMP=`sed "/# postscripts-start-here/,/# postscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript echo "# postscripts-start-here" >> /xcatpost/mypostscript #add requested postscripts in