]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
- initial revision
authorpascalek <pascalek@pld-linux.org>
Sat, 22 Sep 2007 10:22:18 +0000 (10:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    VirtualBox.sh -> 1.1

VirtualBox.sh [new file with mode: 0644]

diff --git a/VirtualBox.sh b/VirtualBox.sh
new file mode 100644 (file)
index 0000000..3f45e90
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+BINFILE=$(basename "$0")
+VBOXDIR=/usr/lib/VirtualBox
+[ ! -d "$VBOXDIR" ] && VBOXDIR=/usr/lib64/VirtualBox
+
+show_message() {
+       if [ ! -z "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then
+               BAK=$IFS
+               IFS=""
+               gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE `echo -e $1`
+               IFS=$BAK
+       else
+               echo -e $1
+       fi
+}
+
+if [ ! -d "$VBOXDIR" ]; then
+       show_message "Can't find VritualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator."
+       exit 1
+fi
+
+if [ ! -c /dev/vboxdrv ]; then
+       show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and if vboxdrv kernel module is loaded."
+       exit 1
+fi
+
+if [ ! -w /dev/vboxdrv ]; then
+       show_message "You don't have write access to /dev/vboxdrv!\nCorrect this situation or contact with your system administrator."
+       exit 1
+fi
+
+LD_LIBRARY_PATH=$VBOXDIR $VBOXDIR/$BINFILE ${1:+"$@"}
This page took 0.091738 seconds and 4 git commands to generate.