diff options
author | Kiel Christofferson <kiel@endpoint.com> | 2014-02-18 17:16:37 -0500 |
---|---|---|
committer | Kiel Christofferson <kiel@endpoint.com> | 2014-02-21 12:56:43 -0500 |
commit | 9240aa3d3ef3c23b3dfea1deb066efdc56dc0e38 (patch) | |
tree | 30d352458c4c6f6659474953c8afe55fc7de15f8 | |
parent | a934c03e0671c6cb6b3cfeff31e42788ecdfdb51 (diff) | |
download | vyos-live-build-9240aa3d3ef3c23b3dfea1deb066efdc56dc0e38.tar.gz vyos-live-build-9240aa3d3ef3c23b3dfea1deb066efdc56dc0e38.zip |
Only grab the latest version of kernel+initrd pair.
-rwxr-xr-x | scripts/build/binary_syslinux | 6 |
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" \ |