]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] fix the status return of the init script
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2007 13:02:52 +0000 (14:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2007 13:02:52 +0000 (14:02 +0100)
R.I. Pienaar reported to me that the init script provided with
haproxy did not correctly report the status of the rhstatus()
function. In fact this was caused by the "exit $RETVAL" instead
of "exit $?" at the end.

examples/haproxy.init

index 55caa250cbf4767743f718fdc1d0d74eb6cb41dd..4de71ee1602662de6c36d607be19dd08fce7d7be 100644 (file)
@@ -108,7 +108,7 @@ case "$1" in
     ;;
   *)
     echo $"Usage: $BASENAME {start|stop|restart|reload|condrestart|status|check}"
-    RETVAL=1
+    exit 1
 esac
  
-exit $RETVAL
+exit $?