1
0
forked from pool/virtualbox
virtualbox/vbox-vboxadd-init-script.diff

264 lines
10 KiB
Diff
Raw Normal View History

Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/installer/vboxadd.sh
+++ VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd.sh
@@ -23,9 +23,12 @@
# Provides: vboxadd
# Required-Start:
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Should-Start: $remote_fs
+# Should-Stop: $remote_fs
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Linux Additions kernel modules
+# Short-Description: VirtualBox Linux Additions kernel modules
### END INIT INFO
## @todo This file duplicates a lot of script with vboxdrv.sh. When making
@@ -94,7 +97,6 @@ fail()
dev=/dev/vboxguest
userdev=/dev/vboxuser
-config=/var/lib/VBoxGuestAdditions/config
owner=vboxadd
group=1
@@ -140,12 +142,6 @@ do_vboxguest_non_udev()
fail "Cannot create device $dev with major $maj and minor $min"
}
fi
- chown $owner:$group $dev 2>/dev/null || {
- rm -f $dev 2>/dev/null
- rm -f $userdev 2>/dev/null
- rmmod vboxguest 2>/dev/null
- fail "Cannot change owner $owner:$group for device $dev"
- }
if [ ! -c $userdev ]; then
maj=10
@@ -156,12 +152,6 @@ do_vboxguest_non_udev()
rmmod vboxguest 2>/dev/null
fail "Cannot create device $userdev with major $maj and minor $min"
}
- chown $owner:$group $userdev 2>/dev/null || {
- rm -f $dev 2>/dev/null
- rm -f $userdev 2>/dev/null
- rmmod vboxguest 2>/dev/null
- fail "Cannot change owner $owner:$group for device $userdev"
- }
fi
fi
}
@@ -171,13 +161,6 @@ start()
begin "Starting the VirtualBox Guest Additions" console;
# If we got this far assume that the slow set-up has been done.
QUICKSETUP=yes
- if test -r $config; then
- . $config
- else
- fail "Configuration file $config not found"
- fi
- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
- fail "Configuration file $config not complete"
uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null &&
ps -A -o comm | grep -q '/*udevd$' 2>/dev/null ||
no_udev=1
@@ -193,7 +176,7 @@ start()
$MODPROBE vboxguest >/dev/null 2>&1 || {
setup
$MODPROBE vboxguest >/dev/null 2>&1 || {
- /sbin/rcvboxadd-x11 cleanup
+ #/sbin/rcvboxadd-x11 cleanup
fail "modprobe vboxguest failed"
}
}
@@ -217,14 +200,14 @@ start()
}
# Put the X.Org driver in place. This is harmless if it is not needed.
- /sbin/rcvboxadd-x11 setup
+ #/sbin/rcvboxadd-x11 setup
# Install the guest OpenGL drivers. For now we don't support
# multi-architecture installations
rm -f /etc/ld.so.conf.d/00vboxvideo.conf
if /usr/bin/VBoxClient --check3d 2>/dev/null; then
mkdir -p /var/lib/VBoxGuestAdditions/lib
- ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
- ln -sf "${INSTALL_DIR}/lib/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
+ ln -sf "/usr/lib64/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
+ ln -sf "/usr/lib64/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
# SELinux for the OpenGL libraries, so that gdm can load them during the
# acceleration support check. This prevents an "Oh no, something has gone
# wrong!" error when starting EL7 guests.
@@ -237,6 +220,15 @@ start()
chcon -h -t lib_t "/var/lib/VBoxGuestAdditions/lib/libEGL.so.1"
fi
echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf
+ # The above code will enable 3D acceleration for Gnome VM desktops. For Plasma 5 (KDE)
+ # VM's almost everything breaks. For that reason, acceleration MUST be disabled here.
+ # Gnome users that want this feature should delete the two 'rm' commands that follow.
+ # You will need to repeat this modification EVERY time the VirtualBox package is
+ # reinstalled
+ # Any KDE user that deletes the two 'rm' commands MUST know how to recover your sustem
+ # from a mode 3 boot. YOU HAVE BEEN WARNED.
+ rm /var/lib/VBoxGuestAdditions/lib/*
+ rm /etc/ld.so.conf.d/00vboxvideo.conf
fi
ldconfig
@@ -382,7 +374,7 @@ extra_setup()
ln -sf "$lib_path/$PACKAGE/mount.vboxsf" /sbin
# And an rc file to re-build the kernel modules and re-set-up the X server.
ln -sf "$lib_path/$PACKAGE/vboxadd" /sbin/rcvboxadd
- ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11
+ #ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11
# And a post-installation script for rebuilding modules when a new kernel
# is installed.
mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d
@@ -415,49 +407,13 @@ EOF
# setup_script
setup()
{
- begin "Building Guest Additions kernel modules" console
- if test -r $config; then
- . $config
- else
- fail "Configuration file $config not found"
- fi
- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
- fail "Configuration file $config not complete"
- export BUILD_TYPE
- export USERNAME
-
- rm -f $LOG
- MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
- BUILDINTMP="$MODULE_SRC/build_in_tmp"
- chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
-
- if setup_modules; then
- mod_succ=0
- else
- mod_succ=1
- show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed."
- fi
- test -n "${QUICKSETUP}" && return "${mod_succ}"
- extra_setup
- if [ "$mod_succ" -eq "0" ]; then
- if running_vboxguest || running_vboxadd; then
- begin "You should restart your guest to make sure the new modules are actually used" console
- fi
- fi
- return "${mod_succ}"
+ begin "Recompiling VirtualBox kernel module, NOT. It has been packaged."
+ succ_msg
}
# cleanup_script
cleanup()
{
- if test -r $config; then
- . $config
- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
- fail "Configuration file $config not complete"
- else
- fail "Configuration file $config not found"
- fi
-
# Delete old versions of VBox modules.
cleanup_modules
depmod
@@ -468,12 +424,12 @@ cleanup()
done
# Clean-up X11-related bits
- /sbin/rcvboxadd-x11 cleanup
+ #/sbin/rcvboxadd-x11 cleanup
# Remove other files
rm /sbin/mount.vboxsf 2>/dev/null
rm /sbin/rcvboxadd 2>/dev/null
- rm /sbin/rcvboxadd-x11 2>/dev/null
+ #rm /sbin/rcvboxadd-x11 2>/dev/null
rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd
rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null
rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null
Index: VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh
+++ VirtualBox-5.1.14/src/VBox/Additions/linux/installer/vboxadd-service.sh
@@ -20,7 +20,7 @@
# Provides: vboxadd-service
# Required-Start: vboxadd
# Required-Stop: vboxadd
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Additions Service
### END INIT INFO
Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxautostart-service.sh
+++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxautostart-service.sh
@@ -20,7 +20,7 @@
# Provides: vboxautostart-service
# Required-Start: vboxdrv
# Required-Stop: vboxdrv
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox autostart service
### END INIT INFO
Index: VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh
+++ VirtualBox-5.1.14/src/VBox/Installer/linux/vboxballoonctrl-service.sh
@@ -20,7 +20,7 @@
# Provides: vboxballoonctrl-service
# Required-Start: vboxdrv
# Required-Stop: vboxdrv
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox watchdog daemon
### END INIT INFO
Index: VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
+++ VirtualBox-5.1.14/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh
@@ -31,7 +31,7 @@
# Provides: testboxscript-service
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: TestBoxScript service
### END INIT INFO
Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
+++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh
@@ -31,7 +31,7 @@
# Provides: vboxtxs
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Test Execution Service
### END INIT INFO
Index: VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
===================================================================
--- VirtualBox-5.1.14.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
+++ VirtualBox-5.1.14/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh
@@ -31,7 +31,7 @@
# Provides: vboxtxs
# Required-Start: $network
# Required-Stop:
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: VirtualBox Test Execution Service
### END INIT INFO