vboxdrv.sh.in revision 37445cb3c8e0ac8323cfb0f7e4b17c0e091efd62
# Linux kernel module init script # Copyright (C) 2006-2010 Oracle Corporation # This file is part of VirtualBox Open Source Edition (OSE), as # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # description: VirtualBox Linux kernel module # Required-Start: $syslog # Short-Description: VirtualBox Linux kernel module # silently exit if the package was uninstalled but not purged, # applies to Debian packages only elif [
"$system" =
"gentoo" ];
then [ -z "${1:-}" ] && return 1 begin_msg "Starting VirtualBox kernel modules" failure "Running VirtualBox in a Xen environment is not supported" failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why" # ensure the character special exists failure "Cannot locate the VirtualBox device" failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" failure "modprobe vboxnetadp failed. Please use 'dmesg' to find out why" # Create the /dev/vboxusb directory if the host supports that method # of USB access. The USB code checks for the existance of that path. begin_msg "Stopping VirtualBox kernel modules" failure "Cannot unload module vboxnetadp" failure "Cannot unload module vboxnetflt" failure "Cannot unload module vboxdrv" # enter the following variables in /etc/default/%PACKAGE%: # SHUTDOWN_USERS="foo bar" # check for running VMs of user foo and user bar # select one of these shutdown methods for running VMs # don't create the ipcd directory with wrong permissions! begin_msg "Sending ACPI power button event to remaining VMs" # wait for some seconds when doing ACPI shutdown begin_msg "Uninstalling old VirtualBox DKMS kernel modules" begin_msg "Removing old VirtualBox netadp kernel module" begin_msg "Removing old VirtualBox netflt kernel module" begin_msg "Removing old VirtualBox kernel module" begin_msg "Trying to register the VirtualBox kernel modules using DKMS" begin_msg "Recompiling VirtualBox kernel modules" echo "VirtualBox kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are loaded." echo "VirtualBox kernel modules (vboxdrv and vboxnetflt) are loaded." echo "VirtualBox kernel module is loaded." # don't create the ipcd directory with wrong permissions! echo "The following VMs are currently running:" echo "VirtualBox kernel module is not loaded." echo "Usage: $0 {start|stop|stop_vms|restart|force-reload|status|setup}"