]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- LSB conformance
authorankry <ankry@pld-linux.org>
Sun, 25 May 2003 15:00:04 +0000 (15:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix.init -> 1.14

postfix.init

index 05196df73d947ef9f86110c0e0efe25cefe50499..b6cdca6728da998134f1869ff3e055d23ce07e38 100644 (file)
@@ -28,7 +28,7 @@ else
        exit 0
 fi
 
-
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -41,12 +41,12 @@ case "$1" in
                        ok
                        touch /var/lock/subsys/postfix
                else
+                       RETVAL=1
                        fail
                        echo "$MSG"
                fi
        else
                msg_already_running Postfix
-               exit 1
        fi
        ;;
   stop)
@@ -55,8 +55,7 @@ case "$1" in
                msg_stopping Postfix
                busy
                MSG="`/usr/sbin/postfix stop 2>&1`"
-               RETVAL=$?
-               if [ $RETVAL -eq 0 ]; then
+               if [ $? -eq 0 ]; then
                        ok
                else
                        fail
@@ -65,23 +64,24 @@ case "$1" in
                rm -f /var/lock/subsys/postfix
        else
                msg_not_running Postfix
-               exit 1
        fi
        ;;
   restart)
        $0 stop
        $0 start
+       exit $?
        ;;
-  reload)
+  reload|force-reload)
        if [ -f /var/lock/subsys/postfix ]; then
                msg_reloading Postfix
                busy
                /usr/sbin/postfix reload
                RETVAL=$?
+               [ $RETVAL -ne 0 ] && RETVAL=7
                [ $RETVAL -eq 0 ] && ok || died
        else
-               msg_not_running Postfix
-               exit 1
+               msg_not_running Postfix >&2
+               exit 7
        fi
        ;;
   status)
@@ -100,8 +100,8 @@ case "$1" in
        /usr/bin/newaliases
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|rebuilddb|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|reload|force-reload|rebuilddb|status}"
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.283778 seconds and 4 git commands to generate.