9 stat_busy
"Loading modules for VirtualBox"
10 for module
in "${MODULES[@]}"; do
11 if [ "$module" = "${module#!}" ]; then
12 modprobe
-q $module >/dev
/null
2>&1
13 grep -q ^
$module /proc
/modules
19 if [ -n "$res" ]; then
21 printhl
"Try running '$0 setup', of course without quotes"
28 stat_busy
"Unloading modules for VirtualBox"
29 for module
in "${MODULES[@]}"; do
30 if [ "$module" = "${module#!}" ]; then
31 REVERSE
="$module $REVERSE"
34 if modprobe
-q -r $REVERSE >/dev
/null
2>&1; then
46 if [ -x /etc
/rc.d
/dkms_autoinstaller
]; then
47 dkms add
-m vboxhost
-v $VBOX_VERSION >/dev
/null
2>&1
48 exec /etc
/rc.d
/dkms_autoinstaller start
50 stat_busy
"Building/installing vbox modules for `uname -srm`"
52 cd "/usr/src/vboxhost-$VBOX_VERSION"
53 SETUP_LOG
='/var/log/vboxdrv-setup.log'
54 make >${SETUP_LOG} 2>&1 && make install >>${SETUP_LOG} 2>&1; RET
=$?
; make clean
>/dev
/null
2>&1
55 if [ "$RET" -eq 0 ]; then
59 printhl
"See '${SETUP_LOG}' for further details"
64 echo "usage: $0 {start|stop|restart|setup}"
66 # vim:set ts=4 sw=4 et: