diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2020-06-21 14:14:08 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2020-06-21 14:14:08 +0300 |
commit | 6d9b530bf493e83c423c7c4058b4bbb44a85db46 (patch) | |
tree | 851531f6fb69224fde421470a68cc8d8bdfebc52 | |
parent | aebd5ed9b340376dc9a3e19b0108217850d87d31 (diff) |
[KRNL-5830] improved detection for non-symlinked kernel on disk
-rw-r--r-- | include/tests_kernel | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/tests_kernel b/include/tests_kernel index 72e5082b..d445bb65 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -674,7 +674,10 @@ 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-//') + VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//') + LogText "Result: version derived from file name is '${VERSION_ON_DISK}'" + elif [ -f "${FOUND_VMLINUZ}" ]; then + VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//') LogText "Result: version derived from file name is '${VERSION_ON_DISK}'" fi |