summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-12-11 19:25:14 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:45 +0100
commit501c1869647e5986bca29e8362e88736e97af8e3 (patch)
tree901ea7855bff44a3b2cdb9fd7e71e4146da9a5ce
parentae059e0556689100c2084df68415996465e1aa1d (diff)
downloadlive-build-501c1869647e5986bca29e8362e88736e97af8e3.zip
live-build-501c1869647e5986bca29e8362e88736e97af8e3.tar.gz
Iterating over all installed kernel images in update-initramfs example hook.
-rwxr-xr-xexamples/hooks/update-initramfs.sh7
1 files changed, 6 insertions, 1 deletions
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