Alignment, restructuring, and quoting of -? option

This commit is contained in:
Michael Boelen 2016-05-11 15:12:37 +02:00
parent 50609242c2
commit 668a1fd0e5

View File

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