openrc support in init-system-helpers part 1

Thorsten Glaser tg at debian.org
Sat Aug 22 04:09:02 BST 2026


On Sat, 22 Aug 2026, Lorenzo wrote:

>* detecting running init: i think the current way is
>    if [ -d "/run/systemd/system" ]; then
>        #systemd
>    elif [ -f /run/openrc/softlevel ]; then
>        #openrc
>    elif [  -f /etc/runit/stopit ]; then
>        #runit
>    elif [ -p /run/initctl ]; then
>        #sysvinit
>    fi

That’s very dangerous.

Bind-mounting /run into chroots is not uncommon,
especially for /run/systemd/journal access…

I did recently learn that I have to mount a tmpfs
over /run/systemd if it exists, so that the first
test in your list fails, for $dayjob where systems
use that.

This could be extended to cover openrc, runit seems
to be unproblematic, but /run/initctl…?

… okay, I can bind-mount an empty file over it.

Oh!

And then delete the file, leading to this funny effect

-rw-r--r-- 0 tg tg 0 22. Aug 05:04 /run/initctl

… which fails test(1) -p.

Yikes, this is a lot of things to take care of. Noted.

bye,
//mirabilos
-- 
https://toot.mirbsd.org/@mirabilos/statuses/01KNQD9RNZM1Z2A61AZHG857MP
long list of references on why “AI”/LLMs are bad for everyone



More information about the Debian-init-diversity mailing list