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