]> git.pld-linux.org Git - packages/dhcp.git/commitdiff
- LSB conformance
authorankry <ankry@pld-linux.org>
Wed, 21 May 2003 11:52:38 +0000 (11:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp-relay.init -> 1.14
    dhcp.init -> 1.11

dhcp-relay.init
dhcp.init

index f56a1f7ca597e7fdf1cd8b854333490f1c5940eb..214f7ad6d6a76c64986d0870760819eb1740f66e 100644 (file)
@@ -27,7 +27,7 @@ if [ -n "DHCP_REALY_INTERFACES" ]; then
        OPTIONS="-i $DHCP_REALY_INTERFACES"
 fi
 
-
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -39,24 +39,29 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcp-relay
        else
                msg_already_running "DHCP relay"
-               exit 1
        fi
        ;;
   stop)
-       msg_stopping "DHCP relay"
-       killproc dhcrelay
-       rm -f /var/lock/subsys/dhcp-relay
+       if [ -f /var/lock/subsys/dhcp-relay ]; then
+               msg_stopping "DHCP relay"
+               killproc dhcrelay
+               rm -f /var/lock/subsys/dhcp-relay
+       else
+               msg_not_running "DHCP relay"
+       fi
        ;;
-  restart|reload)
+  restart|force-reload)
        $0 stop
        $0 start
+       exit $?
        ;;
   status)
        status dhcrelay
+       exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
index ebf709e77fd8b66095ac136a1ae358d4e073809a..4e1bd98b39ab77f4bcf117150d049d8b01bbf19e 100644 (file)
--- a/dhcp.init
+++ b/dhcp.init
@@ -23,6 +23,7 @@ else
        exit 0
 fi
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -34,25 +35,29 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
        else
                msg_already_running DHCPD
-               exit 1
        fi
        ;;
   stop)
-       msg_stopping "DHCP Server"
-       killproc dhcpd
-       rm -f /var/run/dhcpd.pid
-       rm -f /var/lock/subsys/dhcpd
+       if [ -f /var/lock/subsys/dhcpd ]; then
+               msg_stopping "DHCP Server"
+               killproc dhcpd
+               rm -f /var/run/dhcpd.pid /var/lock/subsys/dhcpd >/dev/null 2>&1
+       else
+               msg_not_running DHCPD
+       fi
        ;;
   restart|reload)
        $0 stop
        $0 start
+       exit $?
        ;;
   status)
        status dhcpd
+       exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.093626 seconds and 4 git commands to generate.