Bug#838480: init: inclusion of runit-init into Pre-Depends

Dmitry Bogatov KAction at gnu.org
Fri Sep 23 11:09:03 BST 2016

> >> Dmitry Bogatov [2016-09-21 14:47 +0300]:
> >>> Since 'runit-init' package, which provides /sbin/init is in testing, I
> >>> ask include 'runit-init' into Pre-Depends: of this metapackage.
> >>
> >> Does that need any adjustment in invoke-rc.d, service, or update-rc.d?
> >
> > Seems like runit-run only provides /sbin/init, no
> > /sbin/{poweroff,reboot,runlevel,shutdown,halt,telinit}
> >
> > Those are typically expected by a sysv like system. Not providing them
> > would break quite a lot.
> I tried to install runit-init in a VM and ended up with a basically
> broken system. As mentioned, those tools above were missing, so I wasn't
> able to shutdown/reboot from the desktop environment.

Well, /sbin/init 0 is halt. So I see no problem providing one-line scripts
for following:

 - reboot
 - halt
 - poweroff
 - telinit

I am not sure what to do with `shutdown' and `runlevel':

 - there is no notion of integer runlevel in `runit' -- each "runlevel" is
   just a directory under /etc/sv/runsvdir, which can have arbitrary name except
   'current' and 'default'.
 - shutdown is meant to accept rather complex time specification. I would
   prefer to not reimplement it.

> I then tried to read the runit man page which gave absolutely no clue
> how to reboot the system in a controlled manner.

$ man 8 init

       init 0 tells the Unix process no 1 to shutdown and halt the system.  To
              signal [2]runit(8) the system halt request, runit-init removes  all
              permissions  of  the  file /run/runit.reboot (chmod 0), and sets
              the execute by owner permission of  the  file  [3]/run/runit.stopit
              (chmod 100).  Then a CONT signal is sent to [4]runit(8).

       init 6 tells  the  Unix process no 1 to shutdown and reboot the system.
              To signal [5]runit(8) the system reboot  request,  runit-init  sets
              the  execute  by owner permission of the files /run/runit.reboot
              and [6]/run/runit.stopit (chmod 100). Then a CONT signal is sent to

> As a next step, I did a hard-reset. The system tried to boot but didn't
> offer any gettys or anything which would allow me to login.
> At this point I gave up.

Yes, I definitely missed Recommends: getty-run. Will add in -9
revision. Maybe even Depends? What do you think? Should I allow
to *not* install means for local login?

And, obviously, I use runit as my init system for months already, so I
do not try to sell something I do not use =)

X-Web-Site: https://sinsekvu.github.io | Note that I process my email in batch,
Accept-Languages: eo,ru,en             | at most once every 24 hours. If matter
Accept: text/plain, text/x-diff        | is urgent, you have my phone number.

More information about the Pkg-systemd-maintainers mailing list