[Pkg-sysvinit-devel] A wish for help with Bug#765803 On automatic init system switching on upgrade

Petter Reinholdtsen pere at hungry.com
Fri Nov 21 15:40:53 UTC 2014


[Jonas Smedegaard]
> What is not possible is the action of installing packages as consequence 
> of a debconf question.

That is correct.  But one can change the behaviour of future
installations after asking and then interrupting the upgrade and
requiring a new upgrade.  Not the best user experience, but it might be
good enough.

> Debconf is a mechanism to resolve _configuration_ of packages, which
> happens in postinst, i.e. _after_ packages have been installed (what
> might confuse matters is that the questions involved in that
> configuration may be asked before installation - but that does not
> change that the actual configuration happens _after_ installation).

Sure, that is the intention.  But it can be used to ask questions in the
config script and change the configuration in the same script.  Here is
an idea:

Check in the config script which boot system is being used, and if it is
sysvinit, ask if it is ok to switch to systemd.  If the answer is no,
write a file /etc/apt/preferences.d/no-systemd with the content

Package: systemd-sysv
Pin: release o=Debian
Pin-Priority: -1

abort the upgrade and ask the user to rerun the upgrade with the
modified configuration.  I suspect it would make apt figure out a
different solution to the upgrade and allow existing sysvinit systems to
keep sysvinit in jessie.

This is partly based on the recipe from
<URL:
http://www.vitavonni.de/blog/201410/2014102101-avoiding-systemd.html >

Definitely not a good user experience, but perhaps that can be improved?

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-sysvinit-devel mailing list