| 1 | + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|---|
| 2 | + DEVICE=/dev/vboxdrv
|
|---|
| 3 | + LOG=/var/log/vbox-install.log
|
|---|
| 4 | + VERSION=5.0.8
|
|---|
| 5 | + MODPROBE=/sbin/modprobe
|
|---|
| 6 | + /sbin/modprobe -c
|
|---|
| 7 | + grep -q ^allow_unsupported_modules *0
|
|---|
| 8 | + [ -f /etc/debian_release -a -f /lib/lsb/init-functions ]
|
|---|
| 9 | + NOLSB=yes
|
|---|
| 10 | + [ -f /etc/vbox/vbox.cfg ]
|
|---|
| 11 | + export BUILD_TYPE
|
|---|
| 12 | + export USERNAME
|
|---|
| 13 | + export USER=root
|
|---|
| 14 | + [ -n ]
|
|---|
| 15 | + VBOXMANAGE=/usr/lib/virtualbox/VBoxManage
|
|---|
| 16 | + MODULE_SRC=/usr/share/virtualbox/src/vboxhost
|
|---|
| 17 | + BUILDINTMP=/usr/share/virtualbox/src/vboxhost/build_in_tmp
|
|---|
| 18 | + DODKMS=/usr/share/virtualbox/src/vboxhost/do_dkms
|
|---|
| 19 | + [ ! -f /etc/debian_release -o -x /usr/lib/virtualbox/VBoxManage -a -x /usr/share/virtualbox/src/vboxhost/build_in_tmp ]
|
|---|
| 20 | + [ -n yes ]
|
|---|
| 21 | + [ -f /etc/redhat-release ]
|
|---|
| 22 | + [ -f /etc/SuSE-release ]
|
|---|
| 23 | + [ -f /etc/gentoo-release ]
|
|---|
| 24 | + [ -r /etc/default/virtualbox ]
|
|---|
| 25 | + [ -z yes ]
|
|---|
| 26 | + [ = redhat ]
|
|---|
| 27 | + [ = suse ]
|
|---|
| 28 | + [ = gentoo ]
|
|---|
| 29 | + [ != gentoo ]
|
|---|
| 30 | + setup
|
|---|
| 31 | + stop
|
|---|
| 32 | + begin_msg Stopping VirtualBox kernel modules
|
|---|
| 33 | + [ -z Stopping VirtualBox kernel modules ]
|
|---|
| 34 | + [ -z ]
|
|---|
| 35 | + echo -n Stopping VirtualBox kernel modules
|
|---|
| 36 | + running vboxpci
|
|---|
| 37 | + lsmod
|
|---|
| 38 | + grep -q vboxpci[^_-]
|
|---|
| 39 | + running vboxnetadp
|
|---|
| 40 | + lsmod
|
|---|
| 41 | + grep -q vboxnetadp[^_-]
|
|---|
| 42 | + running vboxdrv
|
|---|
| 43 | + lsmod
|
|---|
| 44 | + grep -q vboxdrv[^_-]
|
|---|
| 45 | + succ_msg
|
|---|
| 46 | + echo ...done.
|
|---|
| 47 | + which dkms
|
|---|
| 48 | + DKMS=/usr/sbin/dkms
|
|---|
| 49 | + [ -n /usr/sbin/dkms ]
|
|---|
| 50 | + begin_msg Uninstalling old VirtualBox DKMS kernel modules
|
|---|
| 51 | + [ -z Uninstalling old VirtualBox DKMS kernel modules ]
|
|---|
| 52 | + [ -z ]
|
|---|
| 53 | + echo -n Uninstalling old VirtualBox DKMS kernel modules
|
|---|
| 54 | + /usr/share/virtualbox/src/vboxhost/do_dkms uninstall vboxhost vboxdrv vboxnetflt vboxnetadp
|
|---|
| 55 | Error! Could not locate dkms.conf file.
|
|---|
| 56 | File: does not exist.
|
|---|
| 57 | + succ_msg
|
|---|
| 58 | + echo ...done.
|
|---|
| 59 | + grep -q vboxpci
|
|---|
| 60 | + uname -r
|
|---|
| 61 | + find /lib/modules/3.19.0-31-generic -name vboxpci\.*
|
|---|
| 62 | + grep -q vboxnetadp
|
|---|
| 63 | + uname -r
|
|---|
| 64 | + find /lib/modules/3.19.0-31-generic -name vboxnetadp\.*
|
|---|
| 65 | + grep -q vboxnetflt
|
|---|
| 66 | + uname -r
|
|---|
| 67 | + find /lib/modules/3.19.0-31-generic -name vboxnetflt\.*
|
|---|
| 68 | + grep -q vboxdrv
|
|---|
| 69 | + uname -r
|
|---|
| 70 | + find /lib/modules/3.19.0-31-generic -name vboxdrv\.*
|
|---|
| 71 | + [ -n /usr/sbin/dkms ]
|
|---|
| 72 | + begin_msg Trying to register the VirtualBox kernel modules using DKMS
|
|---|
| 73 | + [ -z Trying to register the VirtualBox kernel modules using DKMS ]
|
|---|
| 74 | + [ -z ]
|
|---|
| 75 | + echo -n Trying to register the VirtualBox kernel modules using DKMS
|
|---|
| 76 | + /usr/share/virtualbox/src/vboxhost/do_dkms install vboxhost 5.0.8
|
|---|
| 77 | Error! DKMS tree already contains: vboxhost-5.0.8
|
|---|
| 78 | You cannot add the same module/version combo more than once.
|
|---|
| 79 | + fail_msg Failed, trying without DKMS
|
|---|
| 80 | + echo ...failed!
|
|---|
| 81 | + echo (Failed, trying without DKMS)
|
|---|
| 82 | + DKMS=
|
|---|
| 83 | + [ -z ]
|
|---|
| 84 | + begin_msg Recompiling VirtualBox kernel modules
|
|---|
| 85 | + [ -z Recompiling VirtualBox kernel modules ]
|
|---|
| 86 | + [ -z ]
|
|---|
| 87 | + echo -n Recompiling VirtualBox kernel modules
|
|---|
| 88 | + /usr/share/virtualbox/src/vboxhost/build_in_tmp --save-module-symvers /tmp/vboxdrv-Module.symvers --module-source /usr/share/virtualbox/src/vboxhost/vboxdrv --no-print-directory install
|
|---|
| 89 | + /usr/share/virtualbox/src/vboxhost/build_in_tmp --use-module-symvers /tmp/vboxdrv-Module.symvers --module-source /usr/share/virtualbox/src/vboxhost/vboxnetflt --no-print-directory install
|
|---|
| 90 | + /usr/share/virtualbox/src/vboxhost/build_in_tmp --use-module-symvers /tmp/vboxdrv-Module.symvers --module-source /usr/share/virtualbox/src/vboxhost/vboxnetadp --no-print-directory install
|
|---|
| 91 | + /usr/share/virtualbox/src/vboxhost/build_in_tmp --use-module-symvers /tmp/vboxdrv-Module.symvers --module-source /usr/share/virtualbox/src/vboxhost/vboxpci --no-print-directory install
|
|---|
| 92 | + rm -f /etc/vbox/module_not_compiled
|
|---|
| 93 | + succ_msg
|
|---|
| 94 | + echo ...done.
|
|---|
| 95 | + start
|
|---|
| 96 | + begin_msg Starting VirtualBox kernel modules
|
|---|
| 97 | + [ -z Starting VirtualBox kernel modules ]
|
|---|
| 98 | + [ -z ]
|
|---|
| 99 | + echo -n Starting VirtualBox kernel modules
|
|---|
| 100 | + [ -d /proc/xen ]
|
|---|
| 101 | + running vboxdrv
|
|---|
| 102 | + lsmod
|
|---|
| 103 | + grep -q vboxdrv[^_-]
|
|---|
| 104 | + rm -f /dev/vboxdrv
|
|---|
| 105 | + /sbin/modprobe vboxdrv
|
|---|
| 106 | + sleep .2
|
|---|
| 107 | + [ ! -c /dev/vboxdrv ]
|
|---|
| 108 | + chown :root /dev/vboxdrv
|
|---|
| 109 | + /sbin/modprobe vboxnetflt
|
|---|
| 110 | + /sbin/modprobe vboxnetadp
|
|---|
| 111 | + /sbin/modprobe vboxpci
|
|---|
| 112 | + grep -q usb_device /proc/devices
|
|---|
| 113 | + mkdir -p -m 0750 /dev/vboxusb
|
|---|
| 114 | + chown root:vboxusers /dev/vboxusb
|
|---|
| 115 | + succ_msg
|
|---|
| 116 | + echo ...done.
|
|---|
| 117 | + exit 0
|
|---|