diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2020-04-06 21:47:45 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2020-04-06 21:47:45 +0300 |
commit | c368846a08d12901e7de43b525d3e055c7f67508 (patch) | |
tree | 6702dee4e7ee2525bced39ea285d945b83ebf5ff /lynis | |
parent | 798f5322f6908c80fb356b5022ce99012938e42b (diff) |
Added support to require a detected and known package manager
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |