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
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user