]> git.pld-linux.org Git - packages/VirtualBox-bin.git/blob - VirtualBox.sh
- Finished upgrade to 3.2.10
[packages/VirtualBox-bin.git] / VirtualBox.sh
1 #!/bin/sh
2 BINFILE=$(basename "$0")
3 VBOXDIR=@LIBDIR@/VirtualBox
4
5 show_message() {
6         if [ ! -z "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then
7                 echo -e "$1" | gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file -
8         else
9                 echo -e "$1"
10         fi
11 }
12
13 if [ ! -d "$VBOXDIR" ]; then
14         show_message "Can't find VirtualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator."
15         exit 1
16 fi
17
18 if [ ! -c /dev/vboxdrv ]; then
19         show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and whether vboxdrv kernel module is loaded."
20         exit 1
21 fi
22
23 if [ ! -w /dev/vboxdrv ]; then
24         show_message "You don't have write access to /dev/vboxdrv!\nCorrect this situation or contact with your system administrator."
25         exit 1
26 fi
27
28 [ "$BINFILE" = "VBoxVRDP" ] && BINFILE="VBoxHeadless"
29
30 export LD_LIBRARY_PATH=$VBOXDIR
31 exec $VBOXDIR/$BINFILE ${1:+"$@"}
This page took 0.023139 seconds and 3 git commands to generate.