]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/switch-root.c
switch-root: automatically make target switch root dir a mount point
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Jun 2023 16:24:27 +0000 (18:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 2 Jun 2023 16:43:10 +0000 (18:43 +0200)
commitf717d7a40a696b351415976f22a4f498c401de41
tree7eb25bcc635a27c8262c5fc87bc20f0c59753674
parentf9ad896ee2a7c14b6c51bcc26547b82761ec0ab3
switch-root: automatically make target switch root dir a mount point

Let's make sure implicitly that the target directory is a mount point,
instead of doing so manually beforehand. This allows us to drop this
step from the transition into the /run/initramfs/ dir at shutdown.

During the initrd→host transition the switch root operations so far
where towards pre-existing mount points, but there are cetrainly
usecases where it might make sense to siwtch into arbitrary
subdirectories, too.
src/shared/switch-root.c
src/shutdown/shutdown.c