From 7537419a689b36a4d74837f53d4d6e205c1f9692 Mon Sep 17 00:00:00 2001 From: mboelen Date: Wed, 3 Dec 2014 22:50:25 +0100 Subject: [PATCH] Improvement for SuSE based systems when detecting Linux kernel on disk --- include/tests_kernel | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/tests_kernel b/include/tests_kernel index 44839ba2..1f4c87d6 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -464,7 +464,7 @@ logtext "Result: /boot exists, performing more tests from here" FIND=`ls /boot/* 2> /dev/null` if [ ! "${FIND}" = "" ]; then - if [ -f /boot/vmlinuz ]; then + if [ -f /boot/vmlinuz -a ! -L /boot/vmlinuz ]; then logtext "Result: found /boot/vmlinuz" ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data" elif [ -f /boot/vmlinuz-linux ]; then @@ -487,7 +487,11 @@ ReportException "${TEST_NO}:4" "Could not find the kernel version from /boot/vmlinux-linux" fi else - logtext "Result: /boot/vmlinuz not on disk, trying to find /boot/vmlinuz*" + if [ -L /boot/vmlinuz ]; then + logtext "Result: found symlink of /boot/vmlinuz, skipping file" + else + logtext "Result: /boot/vmlinuz not on disk, trying to find /boot/vmlinuz*" + fi # Extra current kernel version and replace dashes to allow numeric sort later on MYKERNEL=`uname -r | sed 's/\.[a-z].*.//g' | sed 's/-[a-z].*.//g' | sed 's/-/./g'` logtext "Result: using ${MYKERNEL} as my kernel version (stripped)"