From d8bbe3899483634b96ceb1c93271310c0c782657 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 28 Dec 2009 03:25:36 +0000 Subject: [PATCH] fix for bug 2922078: 1. use run_ps to run the postbootscripts on AIX. 2. updatenode nodename postscripts_name should not run postbootscripts on AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4849 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index dd78749a3..c407fab85 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -232,6 +232,9 @@ if (-f $scriptname) my $scripts=$ARGV[1]; my $POSTS=join('\n', split(',', $scripts)); #print "scripts=$scripts\n"; + #remove all the postbootscripts + my $PSTMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" $scriptname`; + `echo "$PSTMP" > $scriptname`; #remove all the postscripts my $TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" $scriptname`; `echo "$TMP" > $scriptname`; @@ -243,6 +246,8 @@ if (-f $scriptname) # use the run_ps subroutine to run the postscripts my $TMP1=`sed "/postscripts-start-here/,/postscripts-end-here/ s/\\(.*\\)/run_ps \\1/;s/run_ps *#/#/;s/run_ps *\$//" $scriptname`; + `echo "$TMP1" > $scriptname`; + my $TMP2=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ s/\\(.*\\)/run_ps \\1/;s/run_ps *#/#/;s/run_ps *\$//" $scriptname`; `echo " # subroutine used to run postscripts run_ps () { @@ -259,7 +264,7 @@ run_ps () { # subroutine end " > $scriptname`; - `echo "$TMP1" >> $scriptname`; + `echo "$TMP2" >> $scriptname`; $nodesetstat=`grep "NODESETSTATE=" $scriptname|awk -F \= '{print \$2}'`; chomp($nodesetstat);