From 800657e96512565c733cd144b940aa9d8d6b8ce8 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 10 Mar 2014 11:49:39 +0000 Subject: [PATCH] Allow ubuntu systems still in SysV to check for services. --- bootstrap-salt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 75dcd6d..e2e1671 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1628,16 +1628,16 @@ install_ubuntu_restart_daemons() { } install_ubuntu_check_services() { - if [ ! -f /sbin/initctl ]; then - return 0 - fi - for fname in minion master syndic; do # Skip if not meant to be installed [ $fname = "minion" ] && [ $_INSTALL_MINION -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ $_INSTALL_MASTER -eq $BS_FALSE ] && continue [ $fname = "syndic" ] && [ $_INSTALL_SYNDIC -eq $BS_FALSE ] && continue - __check_services_upstart salt-$fname || return 1 + if [ -f /sbin/initctl ] && [ -f /etc/init/salt-$fname ]; then + __check_services_upstart salt-$fname || return 1 + elif [ -f /etc/init.d/salt-$fname ]; then + __check_services_sysvinit salt-$fname || return 1 + fi done return 0 }