mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 08:44:21 +02:00
[PKGS-7328/PKGS-7330] added non-interactive global option
This commit is contained in:
parent
5e8e2c5f83
commit
bf5219d9b9
@ -344,7 +344,7 @@
|
|||||||
COUNT=0
|
COUNT=0
|
||||||
PACKAGE_AUDIT_TOOL_FOUND=1
|
PACKAGE_AUDIT_TOOL_FOUND=1
|
||||||
PACKAGE_AUDIT_TOOL="zypper"
|
PACKAGE_AUDIT_TOOL="zypper"
|
||||||
FIND=$(${ZYPPERBINARY} -n se -t package -i | ${AWKBINARY} '{ if ($1=="i") { print $3 } }')
|
FIND=$(${ZYPPERBINARY} --non-interactive -n se -t package -i | ${AWKBINARY} '{ if ($1=="i") { print $3 } }')
|
||||||
if [ ! -z "${FIND}" ]; then
|
if [ ! -z "${FIND}" ]; then
|
||||||
for PKG in ${FIND}; do
|
for PKG in ${FIND}; do
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
@ -365,7 +365,7 @@
|
|||||||
if [ ! -z "${ZYPPERBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
if [ ! -z "${ZYPPERBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
Register --test-no PKGS-7330 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Querying Zypper for vulnerable packages"
|
Register --test-no PKGS-7330 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Querying Zypper for vulnerable packages"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
FIND=$(${ZYPPERBINARY} -n pchk | ${GREPBINARY} "(0 security patches)")
|
FIND=$(${ZYPPERBINARY} --non-interactive -n pchk | ${GREPBINARY} "(0 security patches)")
|
||||||
if [ ! -z "${FIND}" ]; then
|
if [ ! -z "${FIND}" ]; then
|
||||||
LogText "Result: No security updates found with Zypper"
|
LogText "Result: No security updates found with Zypper"
|
||||||
Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result "${STATUS_NONE}" --color GREEN
|
Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result "${STATUS_NONE}" --color GREEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user