From e1b3d592f43a99f4ed7c91971deda6ce8414dd69 Mon Sep 17 00:00:00 2001 From: Parabola Date: Mon, 17 Oct 2011 14:16:38 +0000 Subject: Mon Oct 17 14:16:38 UTC 2011 --- community-testing/virtualbox/vboxbuild | 78 ---------------------------------- 1 file changed, 78 deletions(-) delete mode 100755 community-testing/virtualbox/vboxbuild (limited to 'community-testing/virtualbox/vboxbuild') diff --git a/community-testing/virtualbox/vboxbuild b/community-testing/virtualbox/vboxbuild deleted file mode 100755 index 1058744c5..000000000 --- a/community-testing/virtualbox/vboxbuild +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/vbox/vbox.cfg - -MODLIST=() -LOG="/var/log/vbox-install.log" ->| "$LOG" - -if [[ $INSTALL_DIR ]]; then - VBOXMANAGE=$INSTALL_DIR/VBoxManage - BUILDVBOXDRV=$INSTALL_DIR/src/vboxdrv/build_in_tmp - BUILDVBOXNETFLT=$INSTALL_DIR/src/vboxnetflt/build_in_tmp - BUILDVBOXNETADP=$INSTALL_DIR/src/vboxnetadp/build_in_tmp - BUILDVBOXPCI=$INSTALL_DIR/src/vboxpci/build_in_tmp -else - echo "error: missing vbox.cfg" - exit 1 -fi - -if [[ -f /proc/modules ]]; then - IFS=$'\n' read -r -d '' -a MODLIST < \ - <(grep -oE '^vbox(pci|netflt|netadp|drv)' /proc/modules) -fi - -if (( ${#MODLIST[*]} )); then - stat_busy "Unloading VirtualBox kernel modules" - modprobe -ar "${MODLIST[@]}" && stat_done || stat_fail -fi - -for kdir in /lib/modules/*; do - if [[ ! -d $kdir/kernel ]]; then - # found a stale kernel - mods=("$kdir/misc/vbox"{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 - stat_done - else - stat_fail - fi - fi - fi -done - -# default to the currently running kernel -if (( ! $# )); then - set -- $(uname -r) -fi - -for kernver; do - export KERN_DIR=/lib/modules/$kernver/build - if [[ ! -d $KERN_DIR ]]; then - printf "error: \`%s' does not appear to be a valid kernel build directory.\n" \ - "$KERN_DIR" - continue - fi - - stat_busy "Recompiling VirtualBox kernel modules ($kernver)" - for build in BUILDVBOX{DRV,NETFLT,NETADP,PCI}; do - if ! ${!build} \ - --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 - continue - fi - done - stat_done -done - -if (( ${#MODLIST[*]} )); then - stat_busy "Reloading VirtualBox kernel modules" - modprobe -a "${MODLIST[@]}" && stat_done || stat_fail -fi - -- cgit v1.2.3-54-g00ecf