]> git.pld-linux.org Git - packages/VirtualBox.git/blobdiff - wrapper.patch
add basic systemd unit for starting VMSVGA dynamic resizing in guest
[packages/VirtualBox.git] / wrapper.patch
index ca0e8c8a4732e1943dffab1f11a821690fbf6d72..5b1e027bdfc56e1371aac8332e816eba89511c9e 100644 (file)
@@ -1,15 +1,81 @@
---- VirtualBox-4.3.8/src/VBox/Installer/linux/VBox.sh~ 2014-02-25 19:09:10.000000000 +0200
-+++ VirtualBox-4.3.8/src/VBox/Installer/linux/VBox.sh  2014-03-01 14:07:14.898417429 +0200
-@@ -19,9 +19,9 @@
- test -r "${CONFIG}" &&
-     . "${CONFIG}"
- test -z "${INSTALL_DIR}" &&
--    if test -f /usr/lib/virtualbox/VirtualBox &&
--        test -x /usr/lib/virtualbox/VirtualBox; then
--        INSTALL_DIR=/usr/lib/virtualbox
-+    if test -f @INSTALL_DIR@/VBoxSVC &&
-+        test -x @INSTALL_DIR@/VBoxSVC; then
-+        INSTALL_DIR=@INSTALL_DIR@
-     else
-         echo "Could not find VirtualBox installation. Please reinstall."
-         exit 1
+--- VirtualBox-5.1.14/src/VBox/Installer/linux/VBox.sh.orig    2017-02-03 07:40:16.928172726 +0100
++++ VirtualBox-5.1.14/src/VBox/Installer/linux/VBox.sh 2017-02-03 07:42:41.247214271 +0100
+@@ -21,6 +21,7 @@
+ # works on Solaris and OS X.
+ TARGET=`readlink -e -- "${0}"` || exit 1
+ MY_DIR="${TARGET%/[!/]*}"
++APP=`basename $0`
+ # (
+ #     path="${0}"
+@@ -40,14 +41,31 @@
+ #         test -n "${path}" || pwd
+ #     done
+ # )
++ 
++show_message() {
++      local BINFILE=${0##*/} message
++
++      if [ "$DESKTOP" = "kde" ]; then
++              message=$(cat)
++              PATH=$(kde4-config --path exe) kdialog --sorry "$message"
++      elif [ -n "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then
++              gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file -
++      elif [ -n "$DISPLAY" ] && [ -x /usr/bin/zenity ]; then
++              message=$(cat)
++              zenity --error --icon-name=virtualbox --text "$message"
++      else
++              cat >&2
++      fi
++}
++
+-if test -f /usr/lib/virtualbox/VirtualBox &&
+-    test -x /usr/lib/virtualbox/VirtualBox; then
++if test -f "/usr/lib/virtualbox/${APP}" &&
++    test -x "/usr/lib/virtualbox/${APP}"; then
+     INSTALL_DIR=/usr/lib/virtualbox
+-elif test -f "${MY_DIR}/VirtualBox" && test -x "${MY_DIR}/VirtualBox"; then
++elif test -f "${MY_DIR}/${APP}" && test -x "${MY_DIR}/${APP}"; then
+     INSTALL_DIR="${MY_DIR}"
+ else
+-    echo "Could not find VirtualBox installation. Please reinstall."
++    echo "Could not find VirtualBox installation. Please reinstall." | show_message
+     exit 1
+ fi
+@@ -57,7 +75,7 @@
+ if [ "$1" = "shutdown" ]; then
+     SHUTDOWN="true"
+ elif ! lsmod|grep -q vboxdrv; then
+-    cat << EOF
++    show_message << EOF
+ WARNING: The vboxdrv kernel module is not loaded. Either there is no module
+          available for the current kernel (`uname -r`) or it failed to
+          load. Please recompile the kernel module and install it by
+@@ -67,7 +85,7 @@
+          You will not be able to start VMs until this problem is fixed.
+ EOF
+ elif [ ! -c /dev/vboxdrv ]; then
+-    cat << EOF
++    show_message << EOF
+ WARNING: The character device /dev/vboxdrv does not exist. Try
+            sudo /sbin/vboxconfig
+@@ -79,7 +97,7 @@
+ fi
+ if [ -f /etc/vbox/module_not_compiled ]; then
+-    cat << EOF
++    show_message << EOF
+ WARNING: The compilation of the vboxdrv.ko kernel module failed during the
+          installation for some reason. Starting a VM will not be possible.
+          Please consult the User Manual for build instructions.
+@@ -105,7 +123,6 @@
+     exit 0
+ fi
+-APP=`basename $0`
+ case "$APP" in
+     VirtualBox|virtualbox)
+         exec "$INSTALL_DIR/VirtualBox" "$@"
This page took 0.272092 seconds and 4 git commands to generate.