]> git.pld-linux.org Git - packages/apache.git/commitdiff
- please, man test
authorTomasz Pala <gotar@pld-linux.org>
Sat, 17 Apr 2010 15:14:14 +0000 (15:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.67

apache.init

index 1808f709555aa7f37bb5fb4ca809126620e8546d..9b4662ee16ffc3dbc0cea91785cf49ca64ce52fe 100644 (file)
@@ -50,25 +50,24 @@ configtest() {
 checkconfig() {
        local details=${1:-0}
 
-       if [ $details = 1 ]; then
+       if [ $details -eq 1 ]; then
                # run config test and display report (status action)
                show "Checking %s configuration" "$SVC_NAME"; busy
                local out
                out=`configtest 2>&1`
                RETVAL=$?
-               if [ $RETVAL = 0 ]; then
-                       ok
-               else
-                       fail
-               fi
+               [ $RETVAL -eq 0 ] && ok || fail
                [ "$out" ] && echo >&2 "$out"
        else
                # run config test and abort with nice message if failed
                # (for actions checking status before action).
+               show "Checking %s configuration" "$SVC_NAME"; busy
                configtest >/dev/null 2>&1
                RETVAL=$?
-               if [ $RETVAL != 0 ]; then
-                       show "Checking %s configuration" "$SVC_NAME"; fail
+               if [ $RETVAL -eq 0 ]; then
+                       ok
+               else
+                       fail
                        nls 'Configuration test failed. See details with %s "checkconfig"' $0
                        exit $RETVAL
                fi
@@ -146,7 +145,7 @@ case "$1" in
        condrestart 0
        ;;
   reload|force-reload|graceful|flush-logs)
-       reload
+       reload
        ;;
   checkconfig|configtest)
        checkconfig 1
This page took 0.035429 seconds and 4 git commands to generate.