Fix SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].

This commit is contained in:
Pedro Algarvio 2014-04-03 05:27:51 +01:00
parent 391a012a74
commit e2c2a1cbcc

View file

@ -3957,11 +3957,11 @@ daemons_running() {
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)
FAILED_DAEMONS=$((FAILED_DAEMONS + 1))
fi
elif [ "x$(ps wwwaux | grep -v grep | grep salt-$fname)" = "x" ]; then
echoerror "salt-$fname was not found running"
FAILED_DAEMONS=$(expr $FAILED_DAEMONS + 1)
FAILED_DAEMONS=$((FAILED_DAEMONS + 1))
fi
done
return $FAILED_DAEMONS