> 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:
A slightly different approach is also possible:
Ship only /sbin/init as a alternative link ("the default init" as user choice)
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
if [ -d /run/systemd/system ]; then
exec /bin/systemctl reboot
if [ -p /run/initctl ]; then
if [ -e /run/runit.stopit ]; then
exec /sbin/runit-init 6
#if [ test for openrc ]
# exec 'openrc code for reboot'
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.