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