From 9184cbe03f54c9b2650dc78b0739ff6b6ee44338 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 13 Jul 2017 17:09:34 -0400 Subject: [PATCH] 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. --- xCAT-server/share/xcat/install/scripts/post.xcat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index ba66f082b..78717e376 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -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