From: yangsong <xca...@so...> - 2014-08-21 06:12:49
|
The branch, 2.8 has been updated via daace5a88140347e9bd7395061c4ab011c8b4690 (commit) from b7ce4802a1f7e60a5351dd1b5cd77cdfbd483c77 (commit) ----------------------------------------------------------------------- commit daace5a88140347e9bd7395061c4ab011c8b4690 Author: immarvin <ya...@cn...> Date: Thu Aug 21 00:07:58 2014 -0700 fix defect #4253 [DEV] the substitution bug in post.xcat ----------------------------------------------------------------------- diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 10d4069..44fdf29 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -94,7 +94,7 @@ cd /xcatpost export PATH=$PATH:/xcatpost # use the run_ps subroutine to run the postscripts -TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript` +TMP=`sed "/^#\s*postscripts-start-here/,/^#\s*postscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript` echo " # global value to store the running status of the postbootscripts,the value is non-zero if one postbootscript failed return_value=0 @@ -125,12 +125,12 @@ run_ps () { " > /xcatpost/mypostscript echo "$TMP" >> /xcatpost/mypostscript -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript` +TMP=`sed "/^#\s*postbootscripts-start-here/,/^#\s*postbootscripts-end-here/ s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript #save the postboot scripts to /xcatpost/mypostscript.post -TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ d" /xcatpost/mypostscript` +TMP=`sed "/^#\s*postscripts-start-here/,/^#\s*postscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript.post chmod 755 /xcatpost/mypostscript.post @@ -173,7 +173,7 @@ EOF chmod 755 /opt/xcat/xcatdsklspost #only run the prebooot scripts here -TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /xcatpost/mypostscript` +TMP=`sed "/^#\s*postbootscripts-start-here/,/^#\s*postbootscripts-end-here/ d" /xcatpost/mypostscript` echo "$TMP" > /xcatpost/mypostscript export NODE=#TABLE:nodelist:THISNODE:node# |