3 # vboxnetadp Virtual Network Adapter Driver
7 # description: 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_MODULE="vboxnetadp"
17 # Get service config - may override defaults
18 [ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
21 if [ ! -f /var/lock/subsys/vboxnetadp ]; then
22 modprobe -s $VBOX_MODULE
23 # set proper /dev/vboxdrv for systems with static dev
24 touch /var/lock/subsys/vboxnetadp
29 # NOTE: rmmod will wait if device is in use, so automatic rmmod probably is not the best idea
30 /sbin/rmmod $VBOX_MODULE
31 rm -f /var/lock/subsys/vboxnetadp
35 if [ -f /var/lock/subsys/vboxnetadp ]; then
44 # See how we were called.
63 if ! is_module $VBOX_MODULE; then
64 echo "$VBOX_MODULE module is loaded"
66 echo "$VBOX_MODULE module is not loaded"
71 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"