1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Thu, 17 Nov 2022 01:44:32 +0100
Subject: Run bootloader hooks from /etc/initramfs/post-update.d after making
the image, and add $NO_POST_UPDATE_HOOKS to disable this
See <https://kernel-team.pages.debian.net/kernel-handbook/ch-update-hooks.html#s-initramfs-hooks>
Bug-Debian: https://bugs.debian.org/753752
Forwarded: not-needed
---
dracut.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dracut.sh b/dracut.sh
index 7107ce6..71aa1e7 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -3033,4 +3033,10 @@ if [[ -d ${dracutsysrootdir-}/run/systemd/system ]]; then
fi
fi
+# Invoke policy-conformant bootloader hooks
+if [ -z "$NO_POST_UPDATE_HOOKS" ] && [ -d /etc/initramfs/post-update.d/ ]; then
+ run-parts --arg="${kernel}" --arg="${outfile}" \
+ /etc/initramfs/post-update.d/
+fi
+
exit 0
|