diff options
author | Daniel Baumann <daniel@debian.org> | 2008-12-11 19:25:14 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:45 +0100 |
commit | 501c1869647e5986bca29e8362e88736e97af8e3 (patch) | |
tree | 901ea7855bff44a3b2cdb9fd7e71e4146da9a5ce /examples/hooks/update-initramfs.sh | |
parent | ae059e0556689100c2084df68415996465e1aa1d (diff) | |
download | vyos-live-build-501c1869647e5986bca29e8362e88736e97af8e3.tar.gz vyos-live-build-501c1869647e5986bca29e8362e88736e97af8e3.zip |
Iterating over all installed kernel images in update-initramfs example hook.
Diffstat (limited to 'examples/hooks/update-initramfs.sh')
-rwxr-xr-x | examples/hooks/update-initramfs.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/hooks/update-initramfs.sh b/examples/hooks/update-initramfs.sh index 69d326318..5179f77e9 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 |