Missing module in vboxdrv.rc

This commit is contained in:
Michael 2012-09-15 08:29:38 +00:00
parent d3638eb12a
commit 652d5a0957
2 changed files with 23 additions and 15 deletions

View File

@ -7,7 +7,7 @@
pkgname=virtualbox
pkgver=4.2.0
_build=80737
pkgrel=2
pkgrel=3
pkgdesc='Oracle VM VirtualBox Binary Edition'
arch=('i686' 'x86_64')
url='http://virtualbox.org/'
@ -46,14 +46,13 @@ source=(
)
sha256sums=('04030998f15b656e9b76064cde3e6cb43c5a41b1e25e700f123f5a629578fe5e'
'69417a9e8855cab8e4878886abe138f559fd17ae487d4cd19c8a24974a8bbec2'
'578b63ab173cdcd9169d8aff00caf48668e46a6886bb90fd34a0fbe63e180a4e'
'7fc3a205575f0f1ae8875e8593bfb08959fd6ee45eed2edf25509e8bd225a3dc'
'71740893a5f226f9d9fcc607ab9d39b7de816b2759625b34da19162bc7e579ff'
'656905de981ffa24f6f921c920538854a235225053f44baedacc07b46ca0cf56'
'12dbba3b59991f2b68cddeeeda20236aeff63e11b7e2d1b08d9d6a82225f6651'
'b8d4d82c90f81af67f7449d880430bda4d1d73c571851f40c339faee809d7239'
'e6e875ef186578b53106d7f6af48e426cdaf1b4e86834f01696b8ef1c685787f')
[[ "${CARCH}" = i686 ]] && sha256sums[0]='e084db553064fb85136df22d13f262fef602daca56b95799cef7df761310a8d5'
_installdir='/opt/VirtualBox'

View File

@ -7,13 +7,13 @@
if [[ -n "$INSTALL_DIR" ]]; then
VBOXMANAGE="$INSTALL_DIR/VBoxManage"
BUILDVBOXDRV="$INSTALL_DIR/src/vboxhost/build_in_tmp"
BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxhost/build_in_tmp"
BUILDVBOXNETADP="$INSTALL_DIR/src/vboxhost/build_in_tmp"
MODULE_SRC="$INSTALL_DIR/src/vboxhost"
else
echo "Missing /etc/vbox/vbox.cfg"
exit 0
fi
BUILDINTMP="$MODULE_SRC/build_in_tmp"
DODKMS="$MODULE_SRC/do_dkms"
# detection of dkms (if not disabled)
if [[ "$DISABLE_DKMS" =~ [yY][eE][sS] ]]; then
@ -30,16 +30,16 @@ fi
load() {
if [[ "$START_BUILD" =~ [yY][eE][sS] ]]; then
# check if module exists
c=$('find' "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(drv\|netadp\|netflt\).ko' | wc -l)
c=$('find' "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(drv\|netadp\|netflt\|pci\).ko' | wc -l)
((c == 0 )) && setup
fi
stat_busy "Loading VirtualBox kernel modules"
# trivial loading
for module in vbox{drv,netadp,netflt}; do
for module in vbox{drv,netadp,netflt,pci}; do
modprobe $module &>/dev/null
done
# check
for module in vbox{drv,netadp,netflt}; do
for module in vbox{drv,netadp,netflt,pci}; do
if ! grep -q "^${module}" /proc/modules; then
stat_fail
return 1
@ -52,13 +52,13 @@ load() {
unload() {
stat_busy "Unloading VirtualBox kernel modules"
# trivial unload
for module in vbox{netflt,netadp,drv}; do
for module in vbox{pci,netflt,netadp,drv}; do
if grep -q "^${module}" /proc/modules; then
modprobe -r $module &>/dev/null
fi
done
# check
for module in vbox{drv,netadp,netflt}; do
for module in vbox{pci,drv,netadp,netflt}; do
if grep -q "^${module}" /proc/modules; then
stat_fail
return 1
@ -73,7 +73,7 @@ remove() {
status "Removing VirtualBox kernel modules with DKMS" dkms remove -m vboxhost -v "$INSTALL_VER" --all
else
stat_busy "Removing VirtualBox kernel modules"
find "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(drv\|netadp\|netflt\).ko' -delete
find "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(pci\|drv\|netadp\|netflt\).ko' -delete
stat_done
fi
}
@ -87,18 +87,27 @@ setup() {
remove
stat_busy "Compiling VirtualBox kernel modules"
LOG="/tmp/vbox-install.log"
if ! $BUILDVBOXDRV \
if ! $BUILDINTMP \
--save-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxdrv" \
--no-print-directory install > $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
fi
if ! $BUILDVBOXNETFLT \
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxnetflt" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
fi
if ! $BUILDVBOXNETADP \
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxnetadp" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
fi
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxpci" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
fi