summaryrefslogtreecommitdiff
path: root/libre/virtualbox-libre/vboxbuild
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-02-07 21:08:07 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-02-07 21:08:07 +0100
commitb0b6cee54d701214ffadc018f75ef7c82ab9a14d (patch)
tree91165bc3df06d8bf287ea3a1f0a512d8c302e220 /libre/virtualbox-libre/vboxbuild
parent7daf2cc65f7bef79af567cee267faad64605326a (diff)
downloadabslibre-b0b6cee54d701214ffadc018f75ef7c82ab9a14d.tar.gz
abslibre-b0b6cee54d701214ffadc018f75ef7c82ab9a14d.tar.bz2
abslibre-b0b6cee54d701214ffadc018f75ef7c82ab9a14d.zip
Update virtualbox and virtualbox-modules.
Diffstat (limited to 'libre/virtualbox-libre/vboxbuild')
-rw-r--r--libre/virtualbox-libre/vboxbuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/libre/virtualbox-libre/vboxbuild b/libre/virtualbox-libre/vboxbuild
index cfc3c0a66..e6fb94edd 100644
--- a/libre/virtualbox-libre/vboxbuild
+++ b/libre/virtualbox-libre/vboxbuild
@@ -32,11 +32,11 @@ fi
for kdir in /lib/modules/[2-3]*; do
if [[ ! -d $kdir/kernel ]]; then
# found a stale kernel
- mods=("$kdir/misc/vbox"{drv,netadp,netflt,pci}.ko*)
+ mods=("$kdir/extramodules"{drv,netadp,netflt,pci}.ko*)
if (( ${#mods[@]} )); then
stat_busy "Removing all old VirtualBox kernel modules"
if rm -f "${mods[@]}" &&
- rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null; then
+ rmdir -p --ignore-fail-on-non-empty "$kdir/extramodules" 2>/dev/null; then
stat_done
else
stat_fail
@@ -52,6 +52,7 @@ fi
for kernver; do
export KERN_DIR=/lib/modules/$kernver/build
+ export MODULE_DIR=/lib/modules/$kernver/extramodules
if [[ ! -d $KERN_DIR ]]; then
printf "error: \`%s' does not appear to be a valid kernel build directory.\n" \
"$KERN_DIR"
@@ -59,15 +60,22 @@ for kernver; do
fi
stat_busy "Recompiling VirtualBox kernel modules ($kernver)"
- for build in BUILDVBOX{DRV,NETFLT,NETADP,PCI}; do
+ if ! $BUILDVBOXDRV \
+ --save-module-symvers /tmp/vboxdrv-Module.symvers \
+ --no-print-directory install >> $LOG 2>&1; then
+ echo "Look at $LOG to find out what went wrong"
+ stat_fail
+ fi
+ for build in BUILDVBOX{NETFLT,NETADP,PCI}; do
if ! ${!build} \
- --save-module-symvers /tmp/vboxdrv-Module.symvers \
+ --use-module-symvers /tmp/vboxdrv-Module.symvers \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
stat_fail
- continue
fi
done
+ gzip -f9 "$MODULE_DIR"/*.ko
+ depmod "$kernver"
stat_done
done