diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-12-16 11:47:40 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-12-16 11:47:40 +0300 |
commit | 4e255617d37c54ef1d55fcdbde5baa85f380bcb0 (patch) | |
tree | c768ec3687c4285ec79454add7fb7d5b66e8f548 /include/tests_kernel | |
parent | d680fe549fe6e643f666f28f4d86e424ae08ab9e (diff) |
[KRNL-5830] Fetch target for symlinked kernel
Diffstat (limited to 'include/tests_kernel')
-rw-r--r-- | include/tests_kernel | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/tests_kernel b/include/tests_kernel index 9357e298..b3417676 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -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" |