mirror of https://github.com/CISOfy/lynis.git
kernel-test: add linux-lts detection for arch
This commit is contained in:
parent
d17d30d6a7
commit
07084501b6
|
@ -541,10 +541,16 @@
|
|||
else
|
||||
ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data"
|
||||
fi
|
||||
elif [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
|
||||
LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)"
|
||||
LogText "Test: checking kernel version on disk"
|
||||
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
|
||||
elif [ -f ${ROOTDIR}boot/vmlinuz-linux -o -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
|
||||
if [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
|
||||
LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)"
|
||||
LogText "Test: checking kernel version on disk"
|
||||
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
|
||||
else
|
||||
LogText "Result: /found /boot/vmlinuz-linux-lts (usually Arch Linux or similar)"
|
||||
LogText "Test: checking kernel version on disk"
|
||||
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux-lts | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
|
||||
fi
|
||||
if [ -n "${VERSION_ON_DISK}" ]; then
|
||||
LogText "Result: found version ${VERSION_ON_DISK}"
|
||||
ACTIVE_KERNEL=$(uname -r)
|
||||
|
|
Loading…
Reference in New Issue