]> git.pld-linux.org Git - packages/dhcpv6.git/commitdiff
- fixed force-reload, added try-restart action
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 15 Dec 2007 19:26:10 +0000 (19:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp6c.init -> 1.6
    dhcp6s.init -> 1.7

dhcp6c.init
dhcp6s.init

index 5610df128178be5bfc0c028ca32b700e9da66a5a..a90d641855a3fe88c7088d1e777733d8b17d6aad 100644 (file)
@@ -52,6 +52,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/dhcp6c ]; then
+               stop
+               start
+       else
+               msg_not_running "DHCPv6 client daemon"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 case "$1" in
   start)
@@ -60,16 +70,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status dhcp6c
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
index 8ccea44c1b9ac9e7da75ade89bb68ba7722a5e2a..9adb5d1569533033ca26bde1578a5f61fc1fafd3 100644 (file)
@@ -53,6 +53,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/dhcp6s ]; then
+               stop
+               start
+       else
+               msg_not_running "DHCPv6 server daemon"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 case "$1" in
   start)
@@ -61,16 +71,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status dhcp6s
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.10271 seconds and 4 git commands to generate.