From a67f57b980a86535af8cc9f17ad95c174477f195 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 20 Feb 2014 12:03:23 +0000 Subject: [PATCH] Arch now checks for enabled services --- bootstrap-salt.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a4a3809..70e46c8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2671,6 +2671,22 @@ install_arch_linux_restart_daemons() { /etc/rc.d/salt-$fname start done } + +install_arch_check_services() { + if [ ! -f /usr/bin/systemctl ]; then + # Not running systemd!? Don't check! + 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_systemd salt-$fname || return 1 + done + return 0 +} # # Ended Arch Install Functions #