]> git.pld-linux.org Git - packages/VirtualBox-bin.git/blame - VirtualBox.sh
- VBox udev package from binary distribution conflicts with OSE version.
[packages/VirtualBox-bin.git] / VirtualBox.sh
CommitLineData
8058cd41 1#!/bin/sh
8058cd41 2BINFILE=$(basename "$0")
993bb3f8 3VBOXDIR=@LIBDIR@/VirtualBox
8058cd41 4
5show_message() {
6 if [ ! -z "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then
4a366de9 7 echo -e "$1" | gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file -
8058cd41 8 else
426c6175 9 echo -e "$1"
8058cd41 10 fi
11}
12
13if [ ! -d "$VBOXDIR" ]; then
993bb3f8 14 show_message "Can't find VirtualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator."
8058cd41 15 exit 1
16fi
17
18if [ ! -c /dev/vboxdrv ]; then
993bb3f8 19 show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and whether vboxdrv kernel module is loaded."
8058cd41 20 exit 1
21fi
22
23if [ ! -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
26fi
27
8e583ef8
KK
28[ "$BINFILE" = "VBoxVRDP" ] && BINFILE="VBoxHeadless"
29
426c6175
ER
30export LD_LIBRARY_PATH=$VBOXDIR
31exec $VBOXDIR/$BINFILE ${1:+"$@"}
This page took 0.088034 seconds and 4 git commands to generate.