2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Turn off xcatpost at beginning rather than end (#2968)

If a postscript reboots, make sure that our logic for
self-termination is at the least executed.
This commit is contained in:
Jarrod Johnson 2017-05-02 22:35:31 -04:00 committed by yangsong
parent bfa819007d
commit 1461bfd981

View File

@ -46,8 +46,7 @@ ln -s /etc/init.d/xcatpostinit1 /etc/rc.d/rc3.d/S84xcatpostinit1
ln -s /etc/init.d/xcatpostinit1 /etc/rc.d/rc4.d/S84xcatpostinit1
ln -s /etc/init.d/xcatpostinit1 /etc/rc.d/rc5.d/S84xcatpostinit1
cp -f /xcatpost/xcatinstallpost /opt/xcat/xcatinstallpost
cat >> /opt/xcat/xcatinstallpost << EOF
cat > /opt/xcat/xcatinstallpost << EOF
if [ -f /xcatpost/mypostscript.post ]; then
RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2`
fi
@ -55,6 +54,7 @@ if [ "$RUNBOOTSCRIPTS" != "'yes'" ]; then
chkconfig xcatpostinit1 off
fi
EOF
cat /xcatpost/xcatinstallpost >> /opt/xcat/xcatinstallpost
chmod 755 /opt/xcat/xcatinstallpost
ls /etc | grep -i suse