diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-12-23 17:41:26 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-12-23 17:41:26 +0300 |
commit | b7da40c6aeee6429e1716e2c28f855d13c62dc23 (patch) | |
tree | bf82eab9074efc61c1dba657c50b3cc7976e2342 /include/tests_kernel | |
parent | ab4291242da0304552d585844506ecbaa310e765 (diff) |
[KRNL-5830] derive kernel version from filename after obtaining symlink target
Diffstat (limited to 'include/tests_kernel')
-rw-r--r-- | include/tests_kernel | 5 |
1 files 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 |