From c368846a08d12901e7de43b525d3e055c7f67508 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 6 Apr 2020 20:47:45 +0200 Subject: Added support to require a detected and known package manager --- lynis | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lynis') diff --git a/lynis b/lynis index 881b8ade..d5dca003 100755 --- a/lynis +++ b/lynis @@ -524,6 +524,7 @@ ${NORMAL} if [ "${OS}" = "Linux" -a "${HOSTNAME}" = "${FQDN}" ]; then FQDN=$(hostname -f 2> /dev/null) fi + # ################################################################################# # @@ -568,6 +569,7 @@ ${NORMAL} fi Report "test_category=${TEST_CATEGORY_TO_CHECK}" Report "test_group=${TEST_GROUP_TO_CHECK}" + # ################################################################################# # @@ -630,6 +632,7 @@ ${NORMAL} echo "Make sure to execute ${PROGRAM_NAME} from untarred directory or check your installation." exit 1 fi + # ################################################################################# # @@ -817,6 +820,14 @@ ${NORMAL} # ################################################################################# # + # Test if we have a package manager available by testing for a dummy package (should not exist) + if PackageIsInstalled "__dummy__"; then + HAS_PACKAGE_MANAGER=1 + LogText "Informational: package manager is used" + else + LogText "Informational: no known package manager for this system" + fi + # Use hardware detection capabilities IsVirtualMachine if IsContainer; then -- cgit v1.2.3