Improvement for SuSE based systems when detecting Linux kernel on disk

This commit is contained in:
mboelen 2014-12-03 22:50:25 +01:00
parent 44cde264a2
commit 7537419a68
1 changed files with 6 additions and 2 deletions

View File

@ -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
@ -486,8 +486,12 @@
logtext "Result: could not find the version on disk"
ReportException "${TEST_NO}:4" "Could not find the kernel version from /boot/vmlinux-linux"
fi
else
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)"