diff mbox series

[isar-cip-core] initramfs-crypt-hook: Fix ordering with abroofs hook

Message ID 129b362b-f69c-404a-ac9a-a7c1c4f91bc5@siemens.com (mailing list archive)
State New
Headers show
Series [isar-cip-core] initramfs-crypt-hook: Fix ordering with abroofs hook | expand

Commit Message

Jan Kiszka Jan. 9, 2025, 9:54 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

When also the rootfs a/b partitions are encrpyted, abrootfs must run
after decrypting them, or it won't find its mounting target.

Closes #121
Reported-by: Péter Czeglédy <peter.czegledy@evosoft.com>
Tested-by: Péter Czeglédy <peter.czegledy@evosoft.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../initramfs-crypt-hook/files/local-top-complete            | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-crypt-hook/files/local-top-complete b/recipes-initramfs/initramfs-crypt-hook/files/local-top-complete
index 834dea22..95d0a5d9 100644
--- a/recipes-initramfs/initramfs-crypt-hook/files/local-top-complete
+++ b/recipes-initramfs/initramfs-crypt-hook/files/local-top-complete
@@ -12,10 +12,13 @@ 
 prereqs()
 {
 	# Make sure that this script is run last in local-top
+	# If the abroofs or verity hooks are installed, this script
+	# should still come after them.
 	local req
 	for req in "${0%/*}"/*; do
 		script="${req##*/}"
-		if [ "$script" != "${0##*/}" ]; then
+		if [ "$script" != "${0##*/}" ] &&
+		   [ "$script" != "abrootfs" ] && [ "$script" != "verity" ]; then
 			printf '%s\n' "$script"
 		fi
 	done