summaryrefslogtreecommitdiff
path: root/scripts/build/binary_syslinux
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/binary_syslinux')
-rwxr-xr-xscripts/build/binary_syslinux6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index fd1f4e54d..085595ada 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -179,8 +179,10 @@ then
case "${_FLAVOURS}" in
1)
- mv binary/${_INITRAMFS}/vmlinuz-* binary/${_INITRAMFS}/vmlinuz
- mv binary/${_INITRAMFS}/initrd.img-* binary/${_INITRAMFS}/initrd.img
+ # If multiple initrd images are being generated (by DKMS packages, etc),
+ # we likely only want the latest version.
+ mv $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
+ mv $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-* | head -n 1) binary/${_INITRAMFS}/initrd.img
sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOURS}|g" \
-e "s|@LINUX@|/${_INITRAMFS}/vmlinuz|g" \