Removing conflicts of init system

Lorenz at
Fri Dec 21 22:19:18 GMT 2018

Josh Triplett <josh at> ha scritto:
> sysvinit works similarly, with /lib/sysvinit/init
This was in Jessie, but I don't see any /lib/sysvinit/init in Stretch nor
in Sid,
it's /sbin/init now, am I wrong?

Dmitry Bogatov wrote:
>I propose to replace current approach with update-alternatives(1)
>approach.  By coordinated effort of present init systems (in thread), we
>introduce master link /sbin/init and number of slave links:
>       /sbin/halt
>      /sbin/poweroff
>      ....

A slightly different approach is also possible:
Ship only /sbin/init as a alternative link ("the default init" as user
and ship in `init-system-helpers' the following


as programs that check for the current running init and
then execute the proper command. For example
# systemd
if [ -d /run/systemd/system ]; then
   exec /bin/systemctl reboot

if [ -p /run/initctl ]; then
   exec /sbin/sysv-reboot

if [ -e /run/runit.stopit ]; then
   exec /sbin/runit-init 6

#if [ test for openrc ]
#     exec 'openrc code for reboot'
# fi

Of course this require that each init rename it's /sbin/reboot
into something else: systemd already comply, sysv and runit
require some change, and I don't know about Openrc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Debian-init-diversity mailing list