core: when switching root remove /run/systemd before executing the binary specified...
authorFranck Bui <fbui@suse.com>
Wed, 17 Jul 2024 09:02:03 +0000 (11:02 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 22 Jul 2024 10:29:08 +0000 (11:29 +0100)
commit8c28dd24427598214d4464565192ec3f3b1a74a4
tree41d53ad1bc5da3b63ccb24ecd579d1259f045bc9
parent944faf65986f36d7ed3a4ba5cb4cc763011f0f77
core: when switching root remove /run/systemd before executing the binary specified by init=

It's important if the binary specified by the init= boot option is not systemd
otherwise it confuses systemctl that incorrectly assumes that systemd is still
the init system due to the presence of /run/systemd/system.

Also some tools might also check the presence of /run/systemd/private to test
if systemd is running as pid1.
src/core/main.c