source: pkg/boss/main/virtualbox-ose/trunk/debian/patches/09-initscript.dpatch @ 4946

Revision 4946, 1.7 KB checked in by alanbach-guest, 5 years ago (diff)
  • Sync'd with Debian 2.1.2-dfsg-1
Line 
1#!/bin/sh /usr/share/dpatch/dpatch-run
2## 09-initscript.dpatch by Michael Meskes <meskes@debian.org>
3##
4## DP: Some changes to initscript.
5
6@DPATCH@
7
8diff -Naurp virtualbox-ose-2.1.0-dfsg.orig/src/VBox/Installer/linux/vboxdrv.sh.in virtualbox-ose-2.1.0-dfsg/src/VBox/Installer/linux/vboxdrv.sh.in
9--- virtualbox-ose-2.1.0-dfsg.orig/src/VBox/Installer/linux/vboxdrv.sh.in       2008-12-18 16:30:08.000000000 +0100
10+++ virtualbox-ose-2.1.0-dfsg/src/VBox/Installer/linux/vboxdrv.sh.in            2008-12-18 16:36:51.000000000 +0100
11@@ -32,6 +32,8 @@
12 LOG="/var/log/vbox-install.log"
13 NOLSB=%NOLSB%
14 
15+# Include virtualbox-ose defaults if available
16+[ -f /etc/default/virtualbox-ose ] && . /etc/default/virtualbox-ose
17 [ -f /lib/lsb/init-functions ] && NOLSB=
18 [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
19 
20@@ -153,8 +155,10 @@
21         if ! rm -f $DEVICE; then
22             failure "Cannot remove $DEVICE"
23         fi
24-        if ! modprobe vboxdrv > /dev/null 2>&1; then
25-            failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
26+       if [ "$LOAD_VBOXDRV_MODULE" = 1 ]; then
27+               if ! modprobe vboxdrv > /dev/null 2>&1; then
28+                   failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
29+               fi
30         fi
31         sleep .2
32     fi
33@@ -184,8 +188,10 @@
34         rmmod vboxdrv 2>/dev/null
35         failure "Cannot change owner $GROUPNAME for device $DEVICE"
36     fi
37-    if ! modprobe vboxnetflt > /dev/null 2>&1; then
38-        failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why"
39+    if [ "$LOAD_VBOXDRV_MODULE" = 1 ]; then
40+       if ! modprobe vboxnetflt > /dev/null 2>&1; then
41+               failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why"
42+       fi
43     fi
44     succ_msg
45 }
Note: See TracBrowser for help on using the repository browser.