Added --manpage and --dumpoptions

This commit is contained in:
mboelen 2014-11-14 16:15:35 +01:00
parent 2938a2d5af
commit 76a6d1a263

View File

@ -22,6 +22,7 @@
# 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
case $1 in case $1 in
# Assign auditor to report # Assign auditor to report
@ -49,6 +50,13 @@
DEBUG=1 DEBUG=1
;; ;;
--dump-options | --dumpoptions)
OPTIONS="--auditor --check-all_(-c) --cronjob --debug --help --info --license-key --log-file --manpage --no-colors --no-log --pentest --profile --plugins-dir --quiet --quick --report-file --reverse-colors --tests --tests-category --upload --version --view-categories"
for I in ${OPTIONS}; do
echo "${I}"
done
ExitClean
;;
# View help # View help
--help | -h) --help | -h)
VIEWHELP=1 VIEWHELP=1
@ -72,7 +80,7 @@
;; ;;
# Don't use colors # Don't use colors
--no-colors) --no-colors | --nocolors)
NORMAL=""; WARNING=""; SECTION=""; NOTICE=""; OK=""; BAD=""; CYAN=""; MAGENTA=""; PURPLE=""; YELLOW=""; WHITE=""; GREEN=""; RED="" NORMAL=""; WARNING=""; SECTION=""; NOTICE=""; OK=""; BAD=""; CYAN=""; MAGENTA=""; PURPLE=""; YELLOW=""; WHITE=""; GREEN=""; RED=""
;; ;;
@ -92,7 +100,7 @@
;; ;;
# Define a custom plugin directory # Define a custom plugin directory
--plugin-dir) --plugin-dir | --plugins-dir)
shift shift
PLUGINDIR=$1 PLUGINDIR=$1
LASTCHAR=`echo $1 | awk '{ print substr($0, length($0))}'` LASTCHAR=`echo $1 | awk '{ print substr($0, length($0))}'`
@ -118,6 +126,11 @@
QUICKMODE=1 QUICKMODE=1
;; ;;
--report-file)
shift
REPORTFILE=$1
;;
# 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=""; #NORMAL="";
@ -162,7 +175,7 @@
;; ;;
# View man page # View man page
--view-manpage | --man) --view-manpage | --man | --manpage)
if [ -f lynis.8 ]; then if [ -f lynis.8 ]; then
nroff -man lynis.8 nroff -man lynis.8
exit 0 exit 0