diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index e121b8277..a118ff20b 100644 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -109,7 +109,6 @@ export PATH=/xcatpost:$PATH # 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` echo " -# global value to store the running status of the postbootscripts,the value is non-zero if one postbootscript failed return_value=0 # subroutine used to run postscripts run_ps () { @@ -124,7 +123,7 @@ run_ps () { ./\$@ 2>&1 | tee -a $logfile ret_local=\${PIPESTATUS[0]} if [ \"\$ret_local\" -ne \"0\" ]; then - return_value=\$ret_local + return_value=\$ret_local fi else echo "\"\`date\` Postscript \$1 does NOT exist.\"" | tee -a \$logfile @@ -157,13 +156,13 @@ if [ -f /xcatpost/mypostscript.post ]; then RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` fi if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then - chkconfig xcatpostinit1 off + update-rc.d -f xcatpostinit1 remove fi echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF chmod 755 /opt/xcat/xcatinstallpost -chkconfig --add xcatpostinit1 +update-rc.d xcatpostinit1 defaults #create the dskls post cat >/opt/xcat/xcatdsklspost << 'EOF'