On 25 December 2015 at 13:21, Felipe Sateler <fsate...@debian.org> wrote: > Control: tags -1 patch > > Hi, > > On Sun, 23 Aug 2015 11:32:09 -0300 fsate...@debian.org wrote: >> >> Your package virtualbox-guest-x11 has an initscript that is enabled >> in runlevel S, but it does not provide a corresponding systemd >> service unit. > > This init script was introduced back in 2013, due to bug #686994 > (missing modalias). However, that bug has long since been fixed in the > upstream module: > > % modinfo vboxvideo | grep alias > alias: pci:v000080EEd0000BEEFsv*sd*bc*sc*i* > > This means the init script is unnecessary, as it will be autoloaded by > the kernel when the right device is present. I have tested this works > even on jessie. > > Please remove it. Attached is an (untested) patch that > > - removes the init script > - makes sure that the conffile is removed on upgrade > - removes the symlink farm on upgrade > > (BTW, I think the vb-guest-utils init script could be similarly > redundant, but I have not tested).
I realized the patch had an error: postinst snippet should use "configure", not "upgrade". Please find attached a revised version. -- Saludos, Felipe Sateler
diff --git a/debian/virtualbox-guest-x11.init b/debian/virtualbox-guest-x11.init deleted file mode 100644 index 8ce6d44..0000000 --- a/debian/virtualbox-guest-x11.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# (C) 2012 Felix Geyer <fgeyer@debian@org> - -### BEGIN INIT INFO -# Provides: virtualbox-guest-x11 -# Short-Description: VirtualBox Linux X11 Additions -# Required-Start: $remote_fs -# Required-Stop: -# Default-Start: S -# Default-Stop: -### END INIT INFO - -PATH=$PATH:/bin:/sbin:/usr/sbin - -. /lib/lsb/init-functions - -test -e /usr/lib/VBoxOGL.so || exit 0 - -in_virtual_machine() -{ - if [ -z "$(lspci -d 80ee:beef)" ]; then - log_warning_msg "VirtualBox Additions disabled, not in a Virtual Machine" - return 1 - fi - - return 0 -} - -running() -{ - lsmod | grep -q "$1[^_-]" -} - -case "$1" in - start) - in_virtual_machine || exit 0 - log_begin_msg "Loading VirtualBox video kernel module" - - if ! running vboxvideo; then - if ! modprobe vboxvideo > /dev/null 2>&1; then - if ! find /lib/modules/`uname -r` -name "vboxvideo\.*" 2>/dev/null|grep -q vboxvideo; then - log_failure_msg "No suitable module for running kernel found" - else - log_failure_msg "modprobe vboxvideo failed. Please use 'dmesg' to find out why" - fi - log_end_msg 1 - exit 1 - fi - fi - - log_end_msg 0 - ;; - - stop) - ;; - - restart|force-reload) - $0 start - ;; - - *) - echo "Usage: $0 {start|stop|restart|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/debian/virtualbox-guest-x11.maintscript b/debian/virtualbox-guest-x11.maintscript new file mode 100644 index 0000000..a91f4f8 --- /dev/null +++ b/debian/virtualbox-guest-x11.maintscript @@ -0,0 +1 @@ +rm_conffile /etc/init.d/virtualbox-guest-x11 5.0.12-dfsg-2~ diff --git a/debian/virtualbox-guest-x11.postinst b/debian/virtualbox-guest-x11.postinst index bf1f031..748d03a 100644 --- a/debian/virtualbox-guest-x11.postinst +++ b/debian/virtualbox-guest-x11.postinst @@ -7,3 +7,13 @@ if [ "$1" = "configure" ]; then fi #DEBHELPER# + +# remove stale virtualbox-guest-x11 links +case "$1" in + configure) + if dpkg --compare-versions "$2" lt "5.0.12-dfsg-2~" ; then + update-rc.d -f virtualbox-guest-x11 remove > /dev/null || true + fi + ;; +esac +