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