[KRNL-5830] Fetch target for symlinked kernel

This commit is contained in:
Michael Boelen 2019-12-16 09:47:40 +01:00
parent d680fe549f
commit 4e255617d3
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 5 additions and 4 deletions

View File

@ -640,13 +640,14 @@
else
ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data"
fi
elif [ -f ${ROOTDIR}boot/vmlinuz-linux -o -f ${ROOTDIR}boot/vmlinuz-linux-lts -o -f $(ls -t ${ROOTDIR}boot/vmlinuz-* 2> /dev/null | head -1) ]; then
if [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux
elif [ -f ${ROOTDIR}boot/vmlinuz-linux -o -f ${ROOTDIR}boot/vmlinuz-linux-lts -o -f $(ls -t ${ROOTDIR}boot/vm[l-]* 2> /dev/null | head -1) ]; then
if [ -L ${ROOTDIR}boot/vmlinuz-linux ]; then
FOUND_VMLINUZ=$(readlink ${ROOTDIR}boot/vmlinuz-linux)
elif [ -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux-lts
else
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vmlinuz-* 2> /dev/null | head -1)
# Match on /boot/vm5.3.7 or /boot/vmlinuz-5.3.7-1-default
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vm[l-]* 2> /dev/null | head -1)
fi
LogText "Result: found ${FOUND_VMLINUZ}"
LogText "Test: checking kernel version on disk"