From e4de330af2a71366a24598a7aa4fe686c53d47b3 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 8 Feb 2013 12:07:11 +0000 Subject: [PATCH] Added start daemons function support to CentOS stable installations. --- bootstrap-salt.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 9b7e26a..caf1758 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -882,6 +882,20 @@ install_centos_stable() { } install_centos_stable_post() { + for fname in minion master syndic; do + # Skip if not meant to be installed + [ $fname = "minion" ] && [ $INSTALL_MINION -eq 0 ] && continue + [ $fname = "master" ] && [ $INSTALL_MASTER -eq 0 ] && continue + [ $fname = "syndic" ] && [ $INSTALL_SYNDIC -eq 0 ] && continue + + if [ ! -f /sbin/initctl ] && [ -f /etc/init.d/salt-$fname ]; then + # Still in SysV init!? + /sbin/chkconfig salt-$fname on + fi + done +} + +install_centos_stable_start_daemons() { for fname in minion master syndic; do # Skip if not meant to be installed [ $fname = "minion" ] && [ $INSTALL_MINION -eq 0 ] && continue @@ -905,7 +919,6 @@ install_centos_stable_post() { if [ -f /etc/init.d/salt-$fname ]; then # Still in SysV init!? - /sbin/chkconfig salt-$fname on /etc/init.d/salt-$fname start & fi done