Boot-related updates in raring: forwarding upstart support to Debian

Steve Langasek steve.langasek at
Thu Jun 13 00:32:09 UTC 2013

On Wed, Jun 12, 2013 at 04:58:00PM +0100, Dmitrijs Ledkovs wrote:
> On 19 May 2013 02:14, Steve Langasek <steve.langasek at> wrote:
> > Before forwarding upstart jobs, there are a few things to be aware of.  The
> > tl;dr version of this for those who just want to start fixing packages and
> > forwarding patches can be found at
> > <>.

> I've converted a non-trivial scripts into upstart compatible scripts.
> And I have a question about exact requirements behind:

> "Make sure that the upstart jobs and init scripts in the package have
> matching names. If the names do not match, either the init script
> should be split (cf. /etc/init.d/samba->/etc/init.d{s,n}mbd in the
> samba package), or dummy upstart jobs should be created (cf.
> /etc/init/ in the mountall package) so that the names
> line up. Without this, insserv will not correctly detect that the
> upstart job has started and dependency-based booting will fail."

> What are the exact requirements here? one-to-one matching?
> For example in util-linux package there are:
> - in debian: init script
> - in ubuntu: hwclock and hwclock-save upstart jobs

So the precise requirements for insserv compatibility are that if a SysV
init script should be skipped in favor of an upstart job when running under
upstart, there must be an upstart job with the exact same name as the init
script to be skipped.

Combined with the requirement in Policy 9.11 that packages *must* continue
to support SysV init in Debian and not be upstart-only, this means in
practice that almost all packages should have a 1:1 mapping between sysvinit
scripts and upstart jobs.

However, one key exception are packages that implement the init system
itself.  As policy puts it:

     An exception to this rule is scripts or jobs provided by the init
     implementation itself; such jobs may be required for an
     implementation-specific equivalent of the `/etc/rcS.d/' scripts and may
     not have a one-to-one correspondence with the init scripts.

hwclock isn't part of an init system per se, but the script *is*
shipped in /etc/rcS.d.  So it's not surprising that these don't end up being

> I have added the two upstart jobs and created an "dummy"
> upstat job with "start on started hwclock" condition, thus to hint
> insserv that upstart can handle starting "" correctly.

Yep - that sounds exactly like what I did in the mountall package.

> Do I still have to introduce hwclock & hwclock-save init.d scripts as
> well? Or does one only need such compat scripts if there are other
> sysv init scripts that declare dependency on ""?

You don't need them, at all.  Any init scripts that *do* declare a
dependency on '' will have this dependency satisfied by the upstart job.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                          
slangasek at                                     vorlon at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the ubuntu-devel mailing list