mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
PKGS-7410: don't show exception for systems running LXC
This commit is contained in:
parent
609cbf34f3
commit
ad5909372d
@ -1316,11 +1316,18 @@
|
||||
# Only report exception if there are kernels actually there. For example, LXC use the kernel of host system
|
||||
case "${OS}" in
|
||||
"Linux")
|
||||
if [ -d "${ROOTDIR}boot" ]; then
|
||||
if [ -z "$(${FINDBINARY} /boot -maxdepth 1 -type f -name 'vmlinuz*' -print -quit)" ]; then
|
||||
ReportException "${TEST_NO}" "Could not find any kernel packages via package manager"
|
||||
fi
|
||||
fi
|
||||
case "${CONTAINER_TYPE}" in
|
||||
"LXC")
|
||||
LogText "Info: LXC shares the kernel with host, so skipping further testing"
|
||||
;;
|
||||
*)
|
||||
if [ -d "${ROOTDIR}boot" ]; then
|
||||
if [ -z "$(${FINDBINARY} /boot -maxdepth 1 -type f -name 'vmlinuz*' -print -quit)" ]; then
|
||||
ReportException "${TEST_NO}" "Could not find any kernel packages via package manager"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
ReportException "${TEST_NO}" "Could not find any kernel packages via package manager"
|
||||
|
Loading…
x
Reference in New Issue
Block a user