]> git.pld-linux.org Git - packages/VirtualBox-bin.git/blobdiff - VirtualBox-vboxnetflt.init
- added try-restart, force-reload (required by LSB)
[packages/VirtualBox-bin.git] / VirtualBox-vboxnetflt.init
index d4e70507b357febbe29d37109dc6a3565a10f68b..f17f0077dd42a244c768c5c10ce6b7b857f24096 100644 (file)
@@ -32,6 +32,15 @@ stop() {
        rm -f /var/lock/subsys/vboxnetflt
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/vboxnetflt ]; then
+               stop
+               start
+       else
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -45,6 +54,12 @@ case "$1" in
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        if ! is_module $VBOX_MODULE; then
                echo "$VBOX_MODULE module is loaded"
@@ -54,7 +69,7 @@ case "$1" in
        fi
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.031301 seconds and 4 git commands to generate.