Comment 7 for bug 1312836

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [debhelper-devel] [Bug 1312836] Re: [systemd] dh_installinit does not create /etc/rc*.d/S??foo if there is an /etc/init/foo.conf

On Mon, May 12, 2014 at 03:40:42PM -0000, Martin Pitt wrote:
> Adding a debhelper task, to check if we can drop that "autoscripts
> /postinst-init*: Only call update-rc.d when there's no upstart job"
> delta.

No, we cannot. This would cause the init script to be run on boot via
/etc/init/rc.conf, in addition to the upstart job being run, with undefined
behavior.

Before you can drop this debhelper delta, we need insserv enabled in Ubuntu,
which first requires repairing the delta of packages that have had their
init scripts dropped completely in Ubuntu (at this point, possibly mostly
just the initscripts package).

> Whether we can just do that depends on this question: If there is
> an /etc/rc?.d/S??foo and an /etc/init/foo.conf, does upstart only run
> the upstart job and the init.d script gets "masked" by that
> automatically (1)? Or would upstart run both (2)?

2. The masking support is done via startpar + startpar-upstart-bridge,
which is only available once we're insserv enabled.

So the steps are:

 1) fix all per-package deltas in Ubuntu that removed initscripts from the
    package in favor of upstart jobs (i.e.: bring the packages in line with
    current Debian policy wrt upstart jobs)
 2) undo the insserv/sysvinit/startpar changes that have disabled insserv in
    Ubuntu
 3) test insserv extensively in Ubuntu to make sure we're getting the
    expected result
 4) drop the debhelper change