mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
[KRNL-5830] improved detection for non-symlinked kernel on disk
This commit is contained in:
parent
aebd5ed9b3
commit
6d9b530bf4
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue