]>
Commit | Line | Data |
---|---|---|
753cf356 ER |
1 | --- VirtualBox-4.3.8/src/VBox/Installer/linux/VBox.sh 2014-03-01 14:07:14.898417429 +0200 |
2 | +++ VirtualBox-4.3.8/src/VBox/Installer/linux/VBox.sh 2014-03-01 18:25:47.973662413 +0200 | |
3 | @@ -16,14 +16,27 @@ | |
4 | PATH="/usr/bin:/bin:/usr/sbin:/sbin" | |
5 | CONFIG="/etc/vbox/vbox.cfg" | |
6 | ||
7 | +show_message() { | |
8 | + local BINFILE=${0##*/} message | |
9 | + | |
10 | + if [ -n "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then | |
11 | + gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file - | |
12 | + elif [ -n "$DISPLAY" ] && [ -x /usr/bin/zenity ]; then | |
13 | + message=$(cat) | |
14 | + zenity --error --icon-name=virtualbox --text "$message" | |
15 | + else | |
16 | + cat >&2 | |
17 | + fi | |
18 | +} | |
19 | + | |
44a0c82d ER |
20 | test -r "${CONFIG}" && |
21 | . "${CONFIG}" | |
22 | test -z "${INSTALL_DIR}" && | |
23 | - if test -f /usr/lib/virtualbox/VirtualBox && | |
24 | - test -x /usr/lib/virtualbox/VirtualBox; then | |
25 | - INSTALL_DIR=/usr/lib/virtualbox | |
26 | + if test -f @INSTALL_DIR@/VBoxSVC && | |
f84ed0e2 | 27 | + test -x @INSTALL_DIR@/VBoxSVC; then |
44a0c82d ER |
28 | + INSTALL_DIR=@INSTALL_DIR@ |
29 | else | |
753cf356 ER |
30 | - echo "Could not find VirtualBox installation. Please reinstall." |
31 | + echo "Could not find VirtualBox installation. Please reinstall." | show_message | |
44a0c82d | 32 | exit 1 |
753cf356 ER |
33 | fi |
34 | ||
35 | @@ -33,7 +46,7 @@ | |
36 | if [ "$1" = "shutdown" ]; then | |
37 | SHUTDOWN="true" | |
38 | elif ! lsmod|grep -q vboxdrv; then | |
39 | - cat << EOF | |
40 | + show_message << EOF | |
41 | WARNING: The vboxdrv kernel module is not loaded. Either there is no module | |
42 | available for the current kernel (`uname -r`) or it failed to | |
43 | load. Please recompile the kernel module and install it by | |
44 | @@ -43,7 +56,7 @@ | |
45 | You will not be able to start VMs until this problem is fixed. | |
46 | EOF | |
47 | elif [ ! -c /dev/vboxdrv ]; then | |
48 | - cat << EOF | |
49 | + show_message << EOF | |
50 | WARNING: The character device /dev/vboxdrv does not exist. Try | |
51 | ||
52 | sudo /etc/init.d/vboxdrv restart | |
53 | @@ -55,7 +68,7 @@ | |
54 | fi | |
55 | ||
56 | if [ -f /etc/vbox/module_not_compiled ]; then | |
57 | - cat << EOF | |
58 | + show_message << EOF | |
59 | WARNING: The compilation of the vboxdrv.ko kernel module failed during the | |
60 | installation for some reason. Starting a VM will not be possible. | |
61 | Please consult the User Manual for build instructions. |