]> git.pld-linux.org Git - packages/VirtualBox.git/blame - VirtualBox.sh
- up to 1.5.4
[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
661c142c 8 echo -e "$1" | gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file -
b3e14e5c 9 else
a3c2b34e 10 echo -e "$1"
b3e14e5c 11 fi
12}
13
14if [ ! -d "$VBOXDIR" ]; then
15 show_message "Can't find VritualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator."
16 exit 1
17fi
18
19if [ ! -c /dev/vboxdrv ]; then
20 show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and if vboxdrv kernel module is loaded."
21 exit 1
22fi
23
24if [ ! -w /dev/vboxdrv ]; then
25 show_message "You don't have write access to /dev/vboxdrv!\nCorrect this situation or contact with your system administrator."
26 exit 1
27fi
28
a3c2b34e
ER
29export LD_LIBRARY_PATH=$VBOXDIR
30exec $VBOXDIR/$BINFILE ${1:+"$@"}
This page took 0.052334 seconds and 4 git commands to generate.