#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # umount bindmounts /lib/modules from enter-chroot for m in `cat /proc/mounts | /usr/bin/cut -d ' ' -f2 | grep /lib/modules| grep -v "^/$" `; do umount "$m" done # try to load vboxdrv modules if [ `find /lib/modules/"\`uname -r\`" -name vboxdrv.ko` ]; then # check if module_locking is disabled if ! grep -q "module_locking=0" /proc/cmdline; then exit 2 fi modprobe vboxdrv modprobe vboxpci modprobe vboxnetadp modprobe vboxnetflt fi exit 0