3 # virtualbox VirtualBox virtualizer for x86 hardware
7 # description: InnoTek VirtualBox is a general-purpose full virtualizer for x86
8 # hardware. Targeted at server, desktop and embedded use.
12 # Source function library
13 . /etc/rc.d/init.d/functions
15 VBOX_DEVICE="/dev/vboxnetctl"
16 VBOX_MODULE="vboxnetadp"
18 # Get service config - may override defaults
19 [ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
22 if [ -f /var/lock/subsys/vboxnetadp ]; then
26 modprobe -s $VBOX_MODULE
27 touch /var/lock/subsys/vboxnetadp
31 # NOTE: rmmod will wait if device is in use, so automatic rmmod probably is not the best idea
32 /sbin/rmmod $VBOX_MODULE
33 rm -f /var/lock/subsys/vboxnetadp
37 if [ -f /var/lock/subsys/vboxnetadp ]; then
46 # See how we were called.
65 if ! is_module $VBOX_MODULE; then
66 echo "$VBOX_MODULE module is loaded"
68 echo "$VBOX_MODULE module is not loaded"
73 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"