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
|
else
|
||||||
ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data"
|
ReportException "${TEST_NO}:1" "Can't determine kernel version on disk, need debug data"
|
||||||
fi
|
fi
|
||||||
elif [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
|
elif [ -f ${ROOTDIR}boot/vmlinuz-linux -o -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
|
||||||
LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)"
|
if [ -f ${ROOTDIR}boot/vmlinuz-linux ]; then
|
||||||
LogText "Test: checking kernel version on disk"
|
LogText "Result: /found /boot/vmlinuz-linux (usually Arch Linux or similar)"
|
||||||
VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}')
|
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
|
if [ -n "${VERSION_ON_DISK}" ]; then
|
||||||
LogText "Result: found version ${VERSION_ON_DISK}"
|
LogText "Result: found version ${VERSION_ON_DISK}"
|
||||||
ACTIVE_KERNEL=$(uname -r)
|
ACTIVE_KERNEL=$(uname -r)
|
||||||
|
|
Loading…
Reference in New Issue