2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-29 13:38:12 +00:00

Turn off xcatpost at beginning rather than end

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 11:35:45 -04:00
parent 6f10116e59
commit 93b3df81aa

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