syslinux: apply kernel version filtering logic to multi-flavour kernel scenarios

This commit is contained in:
jnqnfe 2015-01-18 01:47:43 +00:00 committed by Lyndon Brown
parent 38af959aa5
commit a773edb813
1 changed files with 6 additions and 2 deletions

View File

@ -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