From 5cd7d72d513f6c984f8f346ce696df29c5ce36a7 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Tue, 5 Feb 2013 13:02:26 +0000 Subject: [PATCH] run postscripts on debian/ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15059 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/install/scripts/post.ubuntu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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'