From 427ad264d65c4e94773e0ebceab21c5501311c20 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 8 Feb 2013 12:33:47 +0000 Subject: [PATCH] Added start daemons function support to Arch installations. --- bootstrap-salt.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index eb172ec..af444df 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1185,11 +1185,10 @@ install_arch_post() { ) sleep 0.1 /usr/bin/systemctl daemon-reload - sleep 0.1 - /usr/bin/systemctl try-restart salt-$fname.service continue fi - /etc/rc.d/salt-$fname start & + + # XXX: How do we enable old Arch init.d scripts? done } @@ -1221,6 +1220,22 @@ install_arch_git_post() { /etc/init.d/salt-$fname start & done } + +install_arch_start_daemons() { + 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 /usr/bin/systemctl ]; then + /usr/bin/systemctl try-restart salt-$fname.service + continue + fi + /etc/rc.d/salt-$fname start & + done +} # # Ended Arch Install Functions #