]> git.pld-linux.org Git - packages/VirtualBox.git/blobdiff - VirtualBox-vboxnetflt.init
- removed obsolete patch
[packages/VirtualBox.git] / VirtualBox-vboxnetflt.init
old mode 100644 (file)
new mode 100755 (executable)
index d4e7050..2cb4b14
@@ -1,29 +1,25 @@
 #!/bin/sh
 #
 # virtualbox   VirtualBox virtualizer for x86 hardware
-#
-# chkconfig:   345 84 25
-#
-# description: InnoTek VirtualBox is a general-purpose full virtualizer for x86 
+# chkconfig:   345 84 16
+# description: Oracle VirtualBox is a general-purpose full virtualizer for x86 \
 #              hardware. Targeted at server, desktop and embedded use.
-#
-# $Id$
 
 # Source function library
 . /etc/rc.d/init.d/functions
 
-VBOX_DEVICE="/dev/vboxnetflt"
 VBOX_MODULE="vboxnetflt"
 
 # Get service config - may override defaults
 [ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
 
 start() {
-       if [ ! -f /var/lock/subsys/vboxnetflt ]; then
-               modprobe -s $VBOX_MODULE
-               # set proper /dev/vboxdrv for systems with static dev
-               touch /var/lock/subsys/vboxnetflt
+       if [ -f /var/lock/subsys/vboxnetflt ]; then
+               return
        fi
+
+       modprobe -s $VBOX_MODULE
+       touch /var/lock/subsys/vboxnetflt
 }
 
 stop() {
@@ -32,6 +28,16 @@ stop() {
        rm -f /var/lock/subsys/vboxnetflt
 }
 
+condrestart() {
+       if [ ! -f /var/lock/subsys/vboxnetflt ]; then
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -45,6 +51,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 +66,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.056937 seconds and 4 git commands to generate.