mirror of https://github.com/CISOfy/lynis.git
Added brew as package manager.
This commit is contained in:
parent
9023aaa052
commit
85236bb996
|
@ -32,6 +32,9 @@
|
|||
#
|
||||
Display --indent 2 --text "- Searching package managers"
|
||||
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
# Test : PKGS-7301
|
||||
# Description : Query FreeBSD pkg
|
||||
if [ -x /usr/sbin/pkg ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
|
@ -80,6 +83,29 @@
|
|||
done
|
||||
Report "installed_packages=${N}"
|
||||
fi
|
||||
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
# Test : PKGS-7303
|
||||
# Description : Query brew package manager
|
||||
if [ `type -p brew` ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no PKGS-7303 --preqs-met ${PREQS_MET} --weight L --network NO --description "Query brew package manager"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
Display --indent 4 --text "- Searching brew" --result FOUND --color GREEN
|
||||
LogText "Result: Found brew"
|
||||
Report "package_manager[]=brew"
|
||||
LogText "Test: Querying brew to get package list"
|
||||
Display --indent 4 --text "- Querying brew for installed packages"
|
||||
LogText "Output:"; LogText "-----"
|
||||
GPACKAGES=`brew list`
|
||||
for J in ${GPACKAGES}; do
|
||||
LogText "Found package ${J}"
|
||||
INSTALLED_PACKAGES="${INSTALLED_PACKAGES}|${J}"
|
||||
done
|
||||
else
|
||||
LogText "Result: brew can NOT be found on this system"
|
||||
fi
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue