From 501c1869647e5986bca29e8362e88736e97af8e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Dec 2008 19:25:14 +0100 Subject: Iterating over all installed kernel images in update-initramfs example hook. --- examples/hooks/update-initramfs.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/hooks/update-initramfs.sh b/examples/hooks/update-initramfs.sh index 69d3263..5179f77 100755 --- a/examples/hooks/update-initramfs.sh +++ b/examples/hooks/update-initramfs.sh @@ -7,4 +7,9 @@ # Note: You only want to use this hook if you have modified any initramfs-script # during the build and need to refresh the initrd.img for that purpose. -update-initramfs -k all -t -u +for KERNEL in /boot/vmlinuz-* +do + VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')" + + update-initramfs -k ${VERSION} -t -u +done -- cgit v1.0