diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-07-12 02:15:38 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-07-12 02:15:38 +0200 |
commit | 8d23351755ef023dc68e90de539ae086dda7dcec (patch) | |
tree | 4ac438d200788bb91041820c145abedb516c2355 /virtualbox_bin/vboxdrv | |
parent | 1c24ee62ce885a56c4228b2082e1bf9147eb1ad7 (diff) | |
download | aur-packages-8d23351755ef023dc68e90de539ae086dda7dcec.tar.gz aur-packages-8d23351755ef023dc68e90de539ae086dda7dcec.tar.xz |
updates
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'virtualbox_bin/vboxdrv')
-rw-r--r-- | virtualbox_bin/vboxdrv | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/virtualbox_bin/vboxdrv b/virtualbox_bin/vboxdrv new file mode 100644 index 0000000..df1bfeb --- /dev/null +++ b/virtualbox_bin/vboxdrv @@ -0,0 +1,54 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/vbox/vbox.cfg + +LOG="/var/log/vbox-install.log" +if [ -n "$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" +else + echo "missing vbox.cfg" + exit 0 +fi +case "$1" in + setup) + if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then + stat_busy "Removing old VirtualBox netadp kernel module" + find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then + stat_busy "Removing old VirtualBox netflt kernel module" + find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then + stat_busy "Removing old VirtualBox kernel module" + find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null + stat_done + fi + stat_busy "Recompiling VirtualBox kernel modules" + 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" + fi + if ! $BUILDVBOXNETFLT \ + --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" + fi + if ! $BUILDVBOXNETADP \ + --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" + fi + stat_done + ;; + *) + echo "usage: $0 {setup}" +esac |