2 # SPDX-License-Identifier: LGPL-2.1-or-later
6 if systemd-detect-virt
-qc; then
7 echo >&2 "This test can't run in a container"
11 # This test requires systemd to run in the initrd as well, which is not the case
12 # for mkinitrd-based initrd (Ubuntu/Debian)
13 if [[ "$(systemctl show -P InitRDTimestampMonotonic)" -eq 0 ]]; then
14 echo "systemd didn't run in the initrd, skipping the test"
19 # We should've created a mount under /run in initrd (see the other half of the test)
20 # that should've survived the transition from initrd to the real system
21 test -d /run
/initrd-mount-target
22 mountpoint
/run
/initrd-mount-target
23 [[ -e /run
/initrd-mount-target
/hello-world
]]
25 # Copy the prepared exitrd to its intended location. Check the respective
26 # test.sh file for details
27 mkdir
-p /run
/initramfs
28 cp -r /exitrd
/* /run
/initramfs
/