2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-10-22 06:55:27 +00:00

Disable postscripts before running postscripts

If a postscript rebooted the system, it would start over.
Deal with it by first disabling the postscript service, then
executing the service.
This commit is contained in:
Jarrod Johnson
2017-07-13 17:09:34 -04:00
parent 6a413f2403
commit 9184cbe03f

View File

@@ -334,7 +334,7 @@ fi
#create the xcatinstallpost
mkdir -p /opt/xcat
cat >/opt/xcat/xcatinstallpost << 'EOF'
#INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatinstallpost#
#!/bin/bash
if [ -f /xcatpost/mypostscript.post ]; then
RUNBOOTSCRIPTS=`grep 'RUNBOOTSCRIPTS=' /xcatpost/mypostscript.post |cut -d= -f2 | tr -d \'\" | tr A-Z a-z`
@@ -356,6 +356,7 @@ else
fi
fi
#INCLUDE:#TABLE:site:key=installdir:value#/postscripts/xcatinstallpost#
EOF
chmod 755 /opt/xcat/xcatinstallpost