]> git.pld-linux.org Git - packages/VirtualBox.git/blame - VirtualBox.sh
- added -j1 do kmk, otherwise build will fail on SMP
[packages/VirtualBox.git] / VirtualBox.sh
CommitLineData
b3e14e5c 1#!/bin/sh
b3e14e5c 2BINFILE=$(basename "$0")
3VBOXDIR=/usr/lib/VirtualBox
4[ ! -d "$VBOXDIR" ] && VBOXDIR=/usr/lib64/VirtualBox
5
6show_message() {
7 if [ ! -z "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then
a3c2b34e 8 local BAK=$IFS
b3e14e5c 9 IFS=""
a3c2b34e 10 gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE $(echo -e "$1")
b3e14e5c 11 IFS=$BAK
12 else
a3c2b34e 13 echo -e "$1"
b3e14e5c 14 fi
15}
16
17if [ ! -d "$VBOXDIR" ]; then
18 show_message "Can't find VritualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator."
19 exit 1
20fi
21
22if [ ! -c /dev/vboxdrv ]; then
23 show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and if vboxdrv kernel module is loaded."
24 exit 1
25fi
26
27if [ ! -w /dev/vboxdrv ]; then
28 show_message "You don't have write access to /dev/vboxdrv!\nCorrect this situation or contact with your system administrator."
29 exit 1
30fi
31
a3c2b34e
ER
32export LD_LIBRARY_PATH=$VBOXDIR
33exec $VBOXDIR/$BINFILE ${1:+"$@"}
This page took 0.028066 seconds and 4 git commands to generate.