test: check if we correctly propagate /run mounts during switch root
Since 7c764d4 we bind mount certain directories during switch root
instead of moving the mount directly, and for /run we do this without
MS_REC. This, unfortunately, leaves all mounts under /run behind
in the old root, which breaks certain use cases.
See: https://github.com/systemd/systemd/issues/28452
This commit is contained in:
committed by
Luca Boccassi
parent
b12d41a8bb
commit
8256994c63
@@ -19,6 +19,11 @@ if systemd-detect-virt -q --container; then
|
||||
test ! -e /run/systemd/container
|
||||
cp -afv /tmp/container /run/systemd/container
|
||||
else
|
||||
# We should've created a mount under /run in initrd (see the other half of the test)
|
||||
# that should've survived the transition from initrd to the real system
|
||||
test -d /run/initrd-mount-target
|
||||
mountpoint /run/initrd-mount-target
|
||||
|
||||
# We bring the loopback netdev up only during a full setup, so it should
|
||||
# not get brought back up during reexec if we disable it beforehand
|
||||
[[ "$(ip -o link show lo)" =~ LOOPBACK,UP ]]
|
||||
|
||||
Reference in New Issue
Block a user