]> git.pld-linux.org Git - packages/VirtualBox.git/blobdiff - VirtualBox-vboxnetflt.init
- cleanups & unify
[packages/VirtualBox.git] / VirtualBox-vboxnetflt.init
index f17f0077dd42a244c768c5c10ce6b7b857f24096..655ef40c5e92d20d2d308dba736e8e73bc1f5d3e 100644 (file)
@@ -19,11 +19,12 @@ VBOX_MODULE="vboxnetflt"
 [ -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() {
@@ -33,12 +34,13 @@ stop() {
 }
 
 condrestart() {
-       if [ -f /var/lock/subsys/vboxnetflt ]; then
-               stop
-               start
-       else
+       if [ ! -f /var/lock/subsys/vboxnetflt ]; then
                RETVAL=$1
+               return
        fi
+
+       stop
+       start
 }
 
 RETVAL=0
This page took 0.040138 seconds and 4 git commands to generate.