summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnqnfe <jnqnfe@gmail.com>2015-01-18 01:47:43 +0000
committerLyndon Brown <jnqnfe@gmail.com>2020-03-16 23:08:26 +0000
commita773edb813fa8e05891c90dbe02cd5e4c8d4f323 (patch)
tree5a062b81cee5983b73061c186240fc03e32357fa
parent38af959aa5a93387085e1fb15fba69c801239aa1 (diff)
downloadvyos-live-build-a773edb813fa8e05891c90dbe02cd5e4c8d4f323.tar.gz
vyos-live-build-a773edb813fa8e05891c90dbe02cd5e4c8d4f323.zip
syslinux: apply kernel version filtering logic to multi-flavour kernel scenarios
-rwxr-xr-xscripts/build/binary_syslinux8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index 409ca2acc..bf3438635 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -161,6 +161,7 @@ then
case "${_FLAVOURS}" in
1)
+ # Rename kernel files
# If multiple initrd images are being generated (by DKMS packages, etc),
# we likely only want the latest version.
ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
@@ -181,8 +182,11 @@ then
do
_NUMBER="$((${_NUMBER} + 1))"
- ln binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
- ln binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
+ # Rename kernel files
+ # If multiple initrd images are being generated (by DKMS packages, etc),
+ # we likely only want the latest version.
+ ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} | head -n 1) binary/${_INITRAMFS}/vmlinuz${_NUMBER}
+ ln $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} | head -n 1) binary/${_INITRAMFS}/initrd${_NUMBER}.img
if [ "${_NUMBER}" -gt 1 ]
then