mirror of https://github.com/CISOfy/lynis.git
Set quiet and quickmode when using --show-warnings-only or show-warnings-only
This commit is contained in:
parent
bedadd9cd1
commit
c02ab08b50
include
|
@ -489,8 +489,10 @@
|
|||
|
||||
if [ ! "${TEXT}" = "" ]; then
|
||||
local SHOW=0
|
||||
if [ ${QUIET} -eq 0 ]; then SHOW=1; fi
|
||||
if [ "${RESULT}" = "WARNING" -a ${SHOW_WARNINGS_ONLY} -eq 1 ]; then SHOW=1; fi
|
||||
if [ ${SHOW_WARNINGS_ONLY} -eq 1 ]; then
|
||||
if [ "${RESULT}" = "WARNING" ]; then SHOW=1; fi
|
||||
elif [ ${QUIET} -eq 0 ]; then SHOW=1
|
||||
fi
|
||||
|
||||
if [ ${SHOW} -eq 1 ]; then
|
||||
# Display (counting with -m instead of -c, to support language locale)
|
||||
|
|
|
@ -306,6 +306,8 @@
|
|||
# Warnings
|
||||
--warnings-only | --show-warnings-only)
|
||||
SHOW_WARNINGS_ONLY=1
|
||||
QUICKMODE=1
|
||||
QUIET=1
|
||||
;;
|
||||
|
||||
# Drop out when using wrong option(s)
|
||||
|
|
|
@ -165,7 +165,6 @@
|
|||
|
||||
# Quick (no waiting for keypresses)
|
||||
quick)
|
||||
QUICKMODE=0
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && QUICKMODE=1
|
||||
Debug "Quickmode set to ${QUICKMODE}"
|
||||
;;
|
||||
|
@ -177,7 +176,8 @@
|
|||
|
||||
# Show warnings only
|
||||
show-warnings-only)
|
||||
SHOW_WARNINGS_ONLY=1
|
||||
QUIET=1
|
||||
QUICKMODE=1
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && SHOW_WARNINGS_ONLY=1
|
||||
Debug "Show warnings only set to ${SHOW_WARNINGS_ONLY}"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue