From: Christian Hofstaedtler Date: Wed, 5 Jun 2013 02:38:33 +0000 (+0200) Subject: Add exit codes to pdns-recursor init script X-Git-Tag: rec-3.6.0-rc1~471^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0fb384235f6e7e9ceb3a8b12538428e7842bc789;p=thirdparty%2Fpdns.git Add exit codes to pdns-recursor init script Fixes #676. --- diff --git a/pdns/pdns-recursor.init.d b/pdns/pdns-recursor.init.d index ebab3d8522..5551fd96a4 100755 --- a/pdns/pdns-recursor.init.d +++ b/pdns/pdns-recursor.init.d @@ -33,8 +33,13 @@ case "$1" in if test "$NOTRUNNING" = "0" then echo "running" + exit 0 else echo "not running" + # Note: 3 is a white lie. We currently don't *really* + # know that it's not running, or if the ping failed for + # other reasons (= 4). + exit 3 fi ;; @@ -46,6 +51,7 @@ case "$1" in echo $ret else echo "not running" + exit 1 fi ;; @@ -61,6 +67,7 @@ case "$1" in if test "$NOTRUNNING" = "0" then echo "already running" + exit 1 else $pdns_server --daemon if test "$?" = "0"