core/systemctl: when switching root default to /sysroot/
authorLennart Poettering <lennart@poettering.net>
Fri, 28 Apr 2023 14:56:39 +0000 (16:56 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 28 Apr 2023 22:26:20 +0000 (23:26 +0100)
commit5ae89ef34774a777c5af7af48b1ad431d10a425e
tree54c2755ddf182ea784e38633b2cc5340a84f1bde
parent77b7026668cd376744a99881777dce8c2f5da835
core/systemctl: when switching root default to /sysroot/

We hardcode the path the initrd uses to prepare the final mount point at
so many places, let's also imply it in "systemctl switch-root" if not
specified.

This adds the fallback both to systemctl and to PID 1 (this is because
both to — different – checks on the path).
man/systemctl.xml
src/core/dbus-manager.c
src/systemctl/systemctl-switch-root.c
src/systemctl/systemctl.c
units/initrd-switch-root.service