syslinux: apply kernel version filtering logic to multi-flavour kernel scenarios
This commit is contained in:
parent
38af959aa5
commit
a773edb813
|
@ -161,6 +161,7 @@ then
|
||||||
|
|
||||||
case "${_FLAVOURS}" in
|
case "${_FLAVOURS}" in
|
||||||
1)
|
1)
|
||||||
|
# Rename kernel files
|
||||||
# If multiple initrd images are being generated (by DKMS packages, etc),
|
# If multiple initrd images are being generated (by DKMS packages, etc),
|
||||||
# we likely only want the latest version.
|
# we likely only want the latest version.
|
||||||
ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
|
ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
|
||||||
|
@ -181,8 +182,11 @@ then
|
||||||
do
|
do
|
||||||
_NUMBER="$((${_NUMBER} + 1))"
|
_NUMBER="$((${_NUMBER} + 1))"
|
||||||
|
|
||||||
ln binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
|
# Rename kernel files
|
||||||
ln binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
|
# 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 ]
|
if [ "${_NUMBER}" -gt 1 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue