mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
[KRNL-5830] improved detection for non-symlinked kernel on disk
This commit is contained in:
parent
aebd5ed9b3
commit
6d9b530bf4
@ -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…
x
Reference in New Issue
Block a user