]> git.pld-linux.org Git - packages/sendmail.git/commitdiff
- LSB conformance
authorankry <ankry@pld-linux.org>
Tue, 27 May 2003 21:54:08 +0000 (21:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    sendmail.init -> 1.14

sendmail.init

index 09b7c1f221b826c4c8925c669621a438fbe78949..ae2daebc81637ef7036490b6c4443670e25bffbe 100644 (file)
@@ -34,7 +34,7 @@ else
        exit 0
 fi
 
-
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -44,11 +44,12 @@ case "$1" in
                busy
                /usr/bin/newaliases >/dev/null 2>&1
                for i in virtusertable access domaintable mailertable; do
-                       if [ -f /etc/mail/$i ] ; then
+                       if [ -f /etc/mail/$i ]; then
                                makemap -v hash /etc/mail/$i < /etc/mail/$i >/dev/null 2>&1
+                               [ $RETVAL -eq 0 ] && RETVAL=$?
                        fi
                done 
-               ok
+               [ $RETVAL -eq 0 ] && ok || fail
                msg_starting sendmail
                daemon /usr/sbin/sendmail $([ "$DAEMON" = "yes" ] && echo -bd) \
                                        $([ -n "$QUEUE" ] && echo -q$QUEUE) \
@@ -58,7 +59,6 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
        else
                msg_already_running sendmail
-               exit 1
        fi
        ;;
   stop)
@@ -66,28 +66,23 @@ case "$1" in
                # Stop daemons.
                msg_stopping sendmail
                killproc sendmail
-               RETVAL=$?
                rm -f /var/lock/subsys/sendmail
        else
                msg_not_running sendmail
-               exit 1
        fi
        ;;
-  restart|reload)
+  restart|force-reload)
        $0 stop
        $0 start
-       ;;
-  force-reload)
-       $0 stop && $0 start
        exit $?
        ;;
   status)
        status sendmail
-       RETVAL=$?
+       exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.07081 seconds and 4 git commands to generate.