mirror of https://github.com/CISOfy/lynis.git
Alignment, restructuring, and quoting of -? option
This commit is contained in:
parent
50609242c2
commit
668a1fd0e5
|
@ -23,6 +23,9 @@
|
|||
#################################################################################
|
||||
#
|
||||
|
||||
echo $#
|
||||
echo $@
|
||||
|
||||
# Check number of parameters submitted (at least one is needed)
|
||||
PARAMCOUNT=$#
|
||||
while [ $# -ge 1 ]; do
|
||||
|
@ -121,18 +124,16 @@
|
|||
;;
|
||||
|
||||
# Perform tests (deprecated, use audit system)
|
||||
-c | --check-all | --checkall)
|
||||
--check-all | --checkall | -c)
|
||||
# echo "Usage of option -c is deprecated. Please use: lynis audit system [options]"
|
||||
CHECK=1
|
||||
;;
|
||||
|
||||
# Cronjob support
|
||||
--cronjob | --cron)
|
||||
CRONJOB=1;
|
||||
# Use some defaults (-c, -Q, no colors)
|
||||
CHECK=1; QUICKMODE=1; NEVERBREAK=1
|
||||
# Get rid of the colors
|
||||
NORMAL=""; WARNING=""; SECTION=""; NOTICE=""; OK=""; BAD=""; CYAN=""; MAGENTA=""; PURPLE=""; YELLOW=""; WHITE=""; GREEN=""; RED=""
|
||||
CRONJOB=1
|
||||
CHECK=1; QUICKMODE=1; NEVERBREAK=1 # Use some defaults (-c, -Q, no colors)
|
||||
NORMAL=""; WARNING=""; SECTION=""; NOTICE=""; OK=""; BAD=""; CYAN=""; MAGENTA=""; PURPLE=""; YELLOW=""; WHITE=""; GREEN=""; RED="" # Remove colors
|
||||
;;
|
||||
|
||||
# Perform tests with additional debugging information on screen
|
||||
|
@ -166,8 +167,9 @@
|
|||
done
|
||||
ExitClean
|
||||
;;
|
||||
|
||||
# View help
|
||||
--help | -h | -?)
|
||||
--help | -h | "-?")
|
||||
VIEWHELP=1
|
||||
;;
|
||||
|
||||
|
@ -200,7 +202,7 @@
|
|||
LOGFILE="/dev/null"
|
||||
;;
|
||||
|
||||
--pentest | --pen-test)
|
||||
--pen-test | --pentest)
|
||||
PENTESTINGMODE=1
|
||||
;;
|
||||
|
||||
|
@ -226,14 +228,13 @@
|
|||
;;
|
||||
|
||||
# Quiet mode
|
||||
-q | --quiet)
|
||||
--quiet | -q)
|
||||
QUIET=1
|
||||
# Run non-interactive
|
||||
QUICKMODE=1
|
||||
QUICKMODE=1 # Run non-interactive
|
||||
;;
|
||||
|
||||
# Non-interactive mode
|
||||
-Q | --quick)
|
||||
--quick | -Q)
|
||||
QUICKMODE=1
|
||||
;;
|
||||
|
||||
|
@ -245,18 +246,13 @@
|
|||
|
||||
# Strip the colors which aren't clearly visible on light backgrounds
|
||||
--reverse-colors)
|
||||
#NORMAL="";
|
||||
SECTION="${NORMAL}";
|
||||
NOTICE="${NORMAL}";
|
||||
#OK="";
|
||||
#BAD="";
|
||||
CYAN="${NORMAL}";
|
||||
GREEN="${NORMAL}";
|
||||
YELLOW="${NORMAL}";
|
||||
WHITE="${NORMAL}";
|
||||
PURPLE="${NORMAL}";
|
||||
#GREEN="";
|
||||
#RED=""
|
||||
;;
|
||||
|
||||
# Skip execution of plugins
|
||||
|
@ -286,7 +282,7 @@
|
|||
;;
|
||||
|
||||
# Version number
|
||||
-V | --version)
|
||||
--version | -V)
|
||||
echo "${PROGRAM_VERSION}"
|
||||
exit 0
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue