From f1172e0e35819820a3baee18bf1d1efd1d539c20 Mon Sep 17 00:00:00 2001 From: mguegan Date: Wed, 15 May 2013 00:03:31 +0200 Subject: [PATCH] daemons_running() : add a proper way to check SmartOS running services --- bootstrap-salt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c7d1e7a..4225cdf 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2540,7 +2540,12 @@ daemons_running() { [ $fname = "master" ] && [ $INSTALL_MASTER -eq $BS_FALSE ] && continue [ $fname = "syndic" ] && [ $INSTALL_SYNDIC -eq $BS_FALSE ] && continue - if [ "x$(ps aux | grep -v grep | grep salt-$fname)" = "x" ]; then + if [ ${DISTRO_NAME} == "SmartOS" ]; then + if [[ $(svcs -Ho STA salt-$fname) != "ON" ]]; then + echoerror "salt-$fname was not found running" + FAILED_DAEMONS=$(expr $FAILED_DAEMONS + 1) + fi + elif [ "x$(ps aux | grep -v grep | grep salt-$fname)" = "x" ]; then echoerror "salt-$fname was not found running" FAILED_DAEMONS=$(expr $FAILED_DAEMONS + 1) fi