diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index 922b4ca67..651d531b3 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -135,15 +135,27 @@ ln -s /etc/init.d/xcatpostinit1 /etc/rc2.d/S84xcatpostinit1 mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatinstallpost# +if [ "$RUNBOOTSCRIPTS" != "yes" ]; then + chkconfig xcatpostinit1 off +fi EOF chmod 755 /opt/xcat/xcatinstallpost #create the dskls post cat >/opt/xcat/xcatdsklspost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatdsklspost# +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinfo EOF chmod 755 /opt/xcat/xcatdsklspost +chkconfig --add xcatpostinit1 + #only run the prebooot scripts here TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/ d" /tmp/mypostscript` echo "$TMP" > /tmp/mypostscript diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x index 231a47aea..d00cbcac2 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel5.s390x @@ -134,6 +134,13 @@ mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' # Install directory variable set by nodeset $INSTALLDIR/postscripts/xcatinstallpost +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF chmod 755 /opt/xcat/xcatinstallpost diff --git a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x index 35a35315d..f574c92be 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.rhel6.s390x @@ -133,6 +133,13 @@ mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' # Install directory variable set by nodeset $INSTALLDIR/postscripts/xcatinstallpost +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF chmod 755 /opt/xcat/xcatinstallpost diff --git a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x index 71f0a76a4..45eee796f 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles10.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles10.s390x @@ -151,6 +151,13 @@ mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' # Install directory variable is set by nodeset $INSTALLDIR/postscripts/xcatinstallpost +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF # Change permissions chmod 755 /opt/xcat/xcatinstallpost diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x index 65b57b97c..e21154d2a 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11.s390x +++ b/xCAT-server/share/xcat/install/scripts/post.sles11.s390x @@ -147,6 +147,13 @@ mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' # Install directory variable is set by nodeset $INSTALLDIR/postscripts/xcatinstallpost +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF # Change permissions chmod 755 /opt/xcat/xcatinstallpost diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 42edb6ddd..a6cc159a9 100644 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -144,9 +144,18 @@ ln -s /etc/init.d/xcatpostinit1 /etc/rc2.d/S84xcatpostinit1 mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatinstallpost# +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinf EOF chmod 755 /opt/xcat/xcatinstallpost +chkconfig --add xcatpostinit1 + #create the dskls post cat >/opt/xcat/xcatdsklspost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatdsklspost# diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index d0c12602f..efaca2e8f 100644 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -145,6 +145,13 @@ ln -s /etc/init.d/xcatpostinit1 /etc/rc.d/rc5.d/S84xcatpostinit1 mkdir -p /opt/xcat cat >/opt/xcat/xcatinstallpost << 'EOF' #INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatinstallpost# +if [ -f /xcatpost/mypostscript.post ]; then + RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2` +fi +if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then + chkconfig xcatpostinit1 off +fi +echo "REBOOT=TRUE" >> /opt/xcat/xcatinfi EOF chmod 755 /opt/xcat/xcatinstallpost