kernel-test: add linux-lts detection for arch

This commit is contained in:
Kristian Schuster 2019-09-26 23:26:08 +02:00
parent d17d30d6a7
commit 07084501b6
No known key found for this signature in database
GPG Key ID: 41D9CF63A7E6A4EB
1 changed files with 10 additions and 4 deletions

View File

@ -541,10 +541,16 @@
else else
ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data" ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data"
fi fi
elif [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then elif [ -f ${ROOTDIR}boot/vmlinuz-linux -o -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)" if [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
LogText "Test: checking kernel version on disk" LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)"
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}') LogText "Test: checking kernel version on disk"
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
else
LogText "Result: /found /boot/vmlinuz-linux-lts (usually Arch Linux or similar)"
LogText "Test: checking kernel version on disk"
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux-lts | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
fi
if [ -n "${VERSION_ON_DISK}" ]; then if [ -n "${VERSION_ON_DISK}" ]; then
LogText "Result: found version ${VERSION_ON_DISK}" LogText "Result: found version ${VERSION_ON_DISK}"
ACTIVE_KERNEL=$(uname -r) ACTIVE_KERNEL=$(uname -r)