test with == is a bashism
authorPeter Palfrader <peter@palfrader.org>
Mon, 10 Oct 2011 21:33:29 +0000 (23:33 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 10 Oct 2011 21:34:01 +0000 (23:34 +0200)
dsa-nagios-checks/checks/dsa-check-config

index 0d62402..2341d07 100755 (executable)
@@ -9,13 +9,13 @@ set -e
 err=0
 
 log() {
-       if [ "$0" == "ok" ] && [ "$err" == 0 ]; then
+       if [ "$0" = "ok" ] && [ "$err" = 0 ]; then
                err=0
-       elif [ "$1" == "warn" ] && [ "$err" -lt 1 ]; then
+       elif [ "$1" = "warn" ] && [ "$err" -lt 1 ]; then
                err=1
-       elif [ "$1" == "critical" ] && [ "$err" -lt 2 ]; then
+       elif [ "$1" = "critical" ] && [ "$err" -lt 2 ]; then
                err=2
-       elif [ "$1" == "unknown" ] && [ "$err" == 0 ]; then
+       elif [ "$1" = "unknown" ] && [ "$err" = 0 ]; then
                err=3
        fi
        if [ "`eval echo \\$$1`" = "" ]; then