From b7da40c6aeee6429e1716e2c28f855d13c62dc23 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 23 Dec 2019 15:41:26 +0100 Subject: [PATCH] [KRNL-5830] derive kernel version from filename after obtaining symlink target --- include/tests_kernel | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/tests_kernel b/include/tests_kernel index 2c2c860f..fbd1ff85 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -645,7 +645,7 @@ LogText "Result: found symlink ${ROOTDIR}boot/vmlinuz-linux" FOUND_VMLINUZ=$(readlink ${ROOTDIR}boot/vmlinuz-linux) LogText "Result: symlinked target is ${FOUND_VMLINUZ}" - VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | sed 's/^vmlinuz-//') + VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's/^vmlinuz-//') elif [ -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then LogText "Result: found boot/vmlinuz-linux-lts" FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux-lts @@ -658,10 +658,11 @@ LogText "Result: found a symlink, retrieving destination" FOUND_VMLINUZ=$(readlink "${FOUND_VMLINUZ}") LogText "Result: destination file is ${FOUND_VMLINUZ}" + VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's/^vmlinuz-//') + LogText "Result: version derived from file name is '${VERSION_ON_DISK}'" fi if [ -z "${VERSION_ON_DISK}" ]; then - LogText "Result: found ${FOUND_VMLINUZ}" LogText "Test: checking kernel version on disk" NEXTLINE=0