Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2021-07-21 14:16:08 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2021-07-21 14:16:08 +0300
commitad5909372d0f00319e40da48b612a2a06cfa065b (patch)
treef2e9d1a95eac4825580a3e145c73cbfcfbba31fe /include/tests_ports_packages
parent609cbf34f36fd21f2e744615e6d9ef1b3afd5cf4 (diff)
PKGS-7410: don't show exception for systems running LXC
Diffstat (limited to 'include/tests_ports_packages')
-rw-r--r--include/tests_ports_packages17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages
index 57f0f25b..2f0b98da 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -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"