2010-12-23 11:08:49 +01:00
|
|
|
Index: src/VBox/Installer/linux/vboxdrv.sh.in
|
|
|
|
===================================================================
|
|
|
|
--- src/VBox/Installer/linux/vboxdrv.sh.in.orig
|
|
|
|
+++ src/VBox/Installer/linux/vboxdrv.sh.in
|
2012-11-07 19:43:50 +01:00
|
|
|
@@ -19,11 +19,12 @@
|
2010-12-23 11:08:49 +01:00
|
|
|
#
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: vboxdrv
|
|
|
|
-# Required-Start: $syslog
|
|
|
|
-# Required-Stop:
|
2011-10-20 10:46:55 +02:00
|
|
|
-# Default-Start: 2 3 4 5
|
2010-12-23 11:08:49 +01:00
|
|
|
+# Required-Start: $syslog $remote_fs
|
|
|
|
+# Required-Stop: $syslog $remote_fs
|
2011-10-20 10:46:55 +02:00
|
|
|
+# Default-Start: 2 3 5
|
2011-08-28 09:05:37 +02:00
|
|
|
# Default-Stop: 0 1 6
|
2012-11-07 19:43:50 +01:00
|
|
|
-# Short-Description: VirtualBox Linux kernel module
|
|
|
|
+# Short-Description: VirtualBox Linux module
|
2010-12-23 11:08:49 +01:00
|
|
|
+# Description: VirtualBox Linux kernel module
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
|
2012-11-07 19:43:50 +01:00
|
|
|
@@ -193,13 +194,6 @@ start()
|
2010-12-23 11:08:49 +01:00
|
|
|
fi
|
|
|
|
fi
|
2011-07-21 12:51:05 +02:00
|
|
|
# ensure permissions
|
2010-12-23 11:08:49 +01:00
|
|
|
- if ! chown :%GROUP% $DEVICE 2>/dev/null; then
|
2011-07-21 12:51:05 +02:00
|
|
|
- rmmod vboxpci 2>/dev/null
|
2010-12-23 11:08:49 +01:00
|
|
|
- rmmod vboxnetadp 2>/dev/null
|
|
|
|
- rmmod vboxnetflt 2>/dev/null
|
|
|
|
- rmmod vboxdrv 2>/dev/null
|
|
|
|
- failure "Cannot change group %GROUP% for device $DEVICE"
|
|
|
|
- fi
|
|
|
|
if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then
|
|
|
|
failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why"
|
|
|
|
fi
|
2012-11-07 19:43:50 +01:00
|
|
|
@@ -297,70 +291,8 @@ stop_vms()
|
2011-01-19 14:48:53 +01:00
|
|
|
# setup_script
|
|
|
|
setup()
|
|
|
|
{
|
|
|
|
- stop
|
2012-11-07 19:43:50 +01:00
|
|
|
- DKMS=`which dkms 2>/dev/null`
|
|
|
|
- if [ -n "$DKMS" ]; then
|
|
|
|
- begin_msg "Uninstalling old VirtualBox DKMS kernel modules"
|
|
|
|
- $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG
|
|
|
|
- succ_msg
|
|
|
|
- fi
|
2011-07-21 12:51:05 +02:00
|
|
|
- if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then
|
|
|
|
- begin_msg "Removing old VirtualBox pci kernel module"
|
|
|
|
- find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|xargs rm -f 2>/dev/null
|
|
|
|
- succ_msg
|
|
|
|
- fi
|
2011-01-19 14:48:53 +01:00
|
|
|
- if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then
|
|
|
|
- begin_msg "Removing old VirtualBox netadp kernel module"
|
|
|
|
- find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null
|
|
|
|
- succ_msg
|
|
|
|
- fi
|
|
|
|
- if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then
|
|
|
|
- begin_msg "Removing old VirtualBox netflt kernel module"
|
|
|
|
- find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null
|
|
|
|
- succ_msg
|
|
|
|
- fi
|
|
|
|
- if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
|
|
|
|
- begin_msg "Removing old VirtualBox kernel module"
|
|
|
|
- find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
|
|
|
|
- succ_msg
|
|
|
|
- fi
|
2012-11-07 19:43:50 +01:00
|
|
|
- if [ -n "$DKMS" ]; then
|
|
|
|
- begin_msg "Trying to register the VirtualBox kernel modules using DKMS"
|
|
|
|
- if ! $DODKMS install vboxhost $VERSION >> $LOG; then
|
|
|
|
- fail_msg "Failed, trying without DKMS"
|
|
|
|
- DKMS=""
|
|
|
|
- fi
|
|
|
|
- fi
|
|
|
|
- if [ -z "$DKMS" ]; then
|
2011-01-19 14:48:53 +01:00
|
|
|
- begin_msg "Recompiling VirtualBox kernel modules"
|
2012-10-02 16:03:09 +02:00
|
|
|
- if ! $BUILDINTMP \
|
2011-01-19 14:48:53 +01:00
|
|
|
- --save-module-symvers /tmp/vboxdrv-Module.symvers \
|
2012-10-02 16:03:09 +02:00
|
|
|
- --module-source "$MODULE_SRC/vboxdrv" \
|
2011-01-19 14:48:53 +01:00
|
|
|
- --no-print-directory install >> $LOG 2>&1; then
|
|
|
|
- failure "Look at $LOG to find out what went wrong"
|
|
|
|
- fi
|
2012-10-02 16:03:09 +02:00
|
|
|
- if ! $BUILDINTMP \
|
2011-01-19 14:48:53 +01:00
|
|
|
- --use-module-symvers /tmp/vboxdrv-Module.symvers \
|
2012-10-02 16:03:09 +02:00
|
|
|
- --module-source "$MODULE_SRC/vboxnetflt" \
|
2011-01-19 14:48:53 +01:00
|
|
|
- --no-print-directory install >> $LOG 2>&1; then
|
|
|
|
- failure "Look at $LOG to find out what went wrong"
|
|
|
|
- fi
|
2012-10-02 16:03:09 +02:00
|
|
|
- if ! $BUILDINTMP \
|
2011-01-19 14:48:53 +01:00
|
|
|
- --use-module-symvers /tmp/vboxdrv-Module.symvers \
|
2012-10-02 16:03:09 +02:00
|
|
|
- --module-source "$MODULE_SRC/vboxnetadp" \
|
2011-04-25 07:36:42 +02:00
|
|
|
- --no-print-directory install >> $LOG 2>&1; then
|
2011-01-19 14:48:53 +01:00
|
|
|
- failure "Look at $LOG to find out what went wrong"
|
|
|
|
- fi
|
2012-10-02 16:03:09 +02:00
|
|
|
- if ! $BUILDINTMP \
|
2011-07-21 12:51:05 +02:00
|
|
|
- --use-module-symvers /tmp/vboxdrv-Module.symvers \
|
2012-10-02 16:03:09 +02:00
|
|
|
- --module-source "$MODULE_SRC/vboxpci" \
|
2011-07-21 12:51:05 +02:00
|
|
|
- --no-print-directory install >> $LOG 2>&1; then
|
|
|
|
- failure "Look at $LOG to find out what went wrong"
|
|
|
|
- fi
|
2011-01-19 14:48:53 +01:00
|
|
|
- fi
|
|
|
|
- rm -f /etc/vbox/module_not_compiled
|
2012-11-07 19:43:50 +01:00
|
|
|
+ begin_msg "Recompiling VirtualBox kernel module, NOT. It has been packaged."
|
2011-07-21 12:51:05 +02:00
|
|
|
succ_msg
|
|
|
|
- start
|
2011-01-19 14:48:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dmnstatus()
|