]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Rename "shutdown initrd" to "exitrd"
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 15 May 2024 06:48:46 +0000 (08:48 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 15 May 2024 08:09:11 +0000 (10:09 +0200)
test/TEST-08-INITRD/test.sh
test/units/TEST-08-INITRD.sh

index badb6cb31a161da8fbb5b7b795c0bfe9bd6f7dd0..cbbe82080f15d453c876d3cfc99487868f182919 100755 (executable)
@@ -14,11 +14,11 @@ TEST_NO_NSPAWN=1
 
 test_append_files() {
     local workspace="${1:?}"
-    local sd_initrd file dir
+    local exitrd file dir
 
-    # Create a shutdown initrd
+    # Create an exitrd
     #
-    # This should provide coverage for shutdown initrd related issues, see:
+    # This should provide coverage for exitrd related issues, see:
     #   - https://github.com/systemd/systemd/issues/28645
     #   - https://github.com/systemd/systemd/pull/28648
     #   - https://github.com/systemd/systemd/pull/28793
@@ -26,25 +26,25 @@ test_append_files() {
     # This is a bit messier than I originally anticipated, as installing our own libraries
     # is handled implicitly by install_systemd() which I don't want to use here, since
     # I need only the systemd-shutdown binary
-    sd_initrd="$workspace/shutdown-initrd"
-    mkdir -p "$sd_initrd/etc" "$sd_initrd/usr"
-    initdir="$sd_initrd" image_install bash /usr/lib/os-release
-    ln -srf "$sd_initrd/usr/lib/os-release" "$sd_initrd/etc/initrd-release"
-    initdir="$sd_initrd" inst_binary "$workspace/usr/lib/systemd/systemd-shutdown" "/usr/lib/systemd/systemd-shutdown"
-    initdir="$sd_initrd" inst_libs "$sd_initrd/usr/lib/systemd/systemd-shutdown"
+    exitrd="$workspace/exitrd"
+    mkdir -p "$exitrd/etc" "$exitrd/usr"
+    initdir="$exitrd" image_install bash /usr/lib/os-release
+    ln -srf "$exitrd/usr/lib/os-release" "$exitrd/etc/initrd-release"
+    initdir="$exitrd" inst_binary "$workspace/usr/lib/systemd/systemd-shutdown" "/usr/lib/systemd/systemd-shutdown"
+    initdir="$exitrd" inst_libs "$exitrd/usr/lib/systemd/systemd-shutdown"
     # We need to deal with libsystemd stuff explicitly, as we don't call install_systemd() here
     while read -r file; do
-        initdir="$sd_initrd" inst_library "$file" "${file##"$workspace"}"
-        initdir="$sd_initrd" inst_libs "$file"
+        initdir="$exitrd" inst_library "$file" "${file##"$workspace"}"
+        initdir="$exitrd" inst_libs "$file"
     done < <(find "$workspace/usr/" -name "libsystemd*.so*")
     # Call systemd-shutdown indirectly, so we can show a message that we can check for
-    # later to make sure the shutdown initrd was actually executed
-    cat >"$sd_initrd/shutdown" <<\EOF
+    # later to make sure the exitrd was actually executed
+    cat >"$exitrd/shutdown" <<\EOF
 #!/usr/bin/bash -eu
-echo "Hello from shutdown initrd"
+echo "Hello from exitrd"
 exec /usr/lib/systemd/systemd-shutdown "$@"
 EOF
-    chmod +x "$sd_initrd/shutdown"
+    chmod +x "$exitrd/shutdown"
 }
 
 check_result_qemu_hook() {
index 58d9bea195f5ac2ff2995bb9b00fb74d7d86f3bf..2f9ec7a2bccae9369f6e80d6158b7019d65cacdf 100755 (executable)
@@ -25,6 +25,6 @@ mountpoint /run/initrd-mount-target
 # Copy the prepared shutdown initrd to its intended location. Check the respective
 # test.sh file for details
 mkdir -p /run/initramfs
-cp -r /shutdown-initrd/* /run/initramfs/
+cp -r /exitrd/* /run/initramfs/
 
 touch /testok