]> git.pld-linux.org Git - packages/apache.git/commitdiff
- use $RETVAL, as echo does not propagete error code
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 18 May 2005 14:19:44 +0000 (14:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.38

apache.init

index a803710c2e3bd1c65dcad5f03162ee304ab8cd62..b3620ecc98d531e352a2e43f48d3628bb20380b5 100644 (file)
@@ -61,9 +61,9 @@ case "$1" in
        if [ -f /var/lock/subsys/httpd ]; then
                msg_stopping httpd.${HTTPD_MPM}
                daemon --waitforname httpd.${HTTPD_MPM} --waitfortime 60 httpd.${HTTPD_MPM} $CFG -k stop
-               RET=$?
+               RETVAL=$?
                # Delete pidfile only when apache was called successfully
-               if [ $RET -eq 0 ]; then
+               if [ $RETVAL -eq 0 ]; then
                        rm -f /var/lock/subsys/httpd /var/run/httpd.pid /var/run/httpd.loc* >/dev/null 2>&1
                fi
        else
@@ -83,13 +83,13 @@ case "$1" in
        if [ -f /var/lock/subsys/httpd ]; then
                msg_reloading httpd.${HTTPD_MPM}
                httpd.${HTTPD_MPM} $CFG -t > /dev/null 2>&1
-               if [ $? -eq 0 ]; then
+               RETVAL=$?
+               if [ $RETVAL -eq 0 ]; then
                    daemon httpd.${HTTPD_MPM} $CFG -k graceful
                else
                    fail
                    echo "Configuration file syntax test failed."
                fi
-               RETVAL=$?
        else
                msg_not_running httpd.${HTTPD_MPM} >&2
                RETVAL=7
This page took 0.461297 seconds and 4 git commands to generate.