The inittab interface - Re: Bug#766187: runit: Fails to install runit after fresh install of jessie beta2

Gerrit Pape pape at dbnbgs.smarden.org
Mon Nov 24 21:41:12 GMT 2014


On Sat, Oct 25, 2014 at 09:34:50AM +0000, Gerrit Pape wrote:
> On Wed, Oct 22, 2014 at 09:20:46AM +0000, Gerrit Pape wrote:
> > On Tue, Oct 21, 2014 at 08:29:54AM -0400, Nikolay Hristov wrote:
> > > Setting up runit (2.1.2-1) ...
> > > grep: /etc/inittab: No such file or directory
> > > grep: /etc/inittab: No such file or directory
> > > cp: cannot stat ‘/etc/inittab’: No such file or directory
> > > dpkg: error processing package runit (--configure):
> > >  subprocess installed post-installation script returned error exit status 1
> > > Errors were encountered while processing:
> > >  runit
> > > E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> > Since ages runit hooks into /etc/inittab to provide system wide service
> > supervision.  As long as sysvinit provided /etc/inittab and was
> > essential this simply worked.  Now on fresh jessie install, no
> > /etc/inittab is created at all.  While this alone wouldn't be a problem,
> > because runit provides a simple systemd unit after I learned that
> > there's no backward compatibility to the /etc/inittab interface, it is a
> > problem when switching such an installation from systemd to sysvinit:
> > 
> > When switching to sysvinit, the /etc/inittab file is created, but
> > doesn't include the lines enabling the runit supervision.  After reboot
> > runit supervision will not be enabled, although the package is
> > installed.  This would be a grave bug as other packages depend on this
> > assumption.
> > 
> > Any idea on how to fix this?
> 
> This is far from ideal, but the only easy fix I came up with until now
> is to copy debian/share/inittab* from the sysvinit source package, as
> well as the debian/rules logic to install a system-specific inittab
> template and the postinst logic to create /etc/inittab if it does not
> exist, into the runit package.
> 
> A better fix certainly will need more thoughts, coordination, and
> testing, which I'm afraid I can't work on currently.  Anyone?

This is not yet resolved, unfortunately.  It currently affects at least
two packages and a minor number of dependencies:
https://bugs.debian.org/766187 and https://bugs.debian.org/767933

Suggestions I got are (1) check whether /etc/inittab exists before
adding the service, continue if it doesn't exist, and (2)
https://bugs.debian.org/767933#46

(1) seems not to be the solution.  When installing default jessie, then
installing runit or daemontools-run, and afterwards sysvinit-core, the
service supervision will be disabled.  There may be a package in jessie
that implements (1), I'm not sure what isdnutils does these days.

Better than (2) would be to make the existence of /etc/inittab still
essential for jessie, by moving the corresponding code from
sysvinit-core into the essential init package.  What do you think?

Regards, Gerrit.



More information about the Pkg-systemd-maintainers mailing list