Add lynis show hostids to display host IDs

This commit is contained in:
Michael Boelen 2016-05-17 18:08:08 +02:00
parent 0d62613388
commit 443497855e

View File

@ -32,10 +32,11 @@ COMMANDS="audit show update"
HELPERS="audit configure show update" HELPERS="audit configure show update"
OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--info\n--license-key --log-file\n--manpage_(--man)\n--no-colors --no-log\n--pentest\n--profile\n--plugins-dir\n--quiet (-q)\n--quick (-Q)\n--report-file\n--reverse-colors\n--tests\n--tests-category\n--upload\n--verbose\n--version (-V)\n--view-categories" OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--info\n--license-key --log-file\n--manpage_(--man)\n--no-colors --no-log\n--pentest\n--profile\n--plugins-dir\n--quiet (-q)\n--quick (-Q)\n--report-file\n--reverse-colors\n--tests\n--tests-category\n--upload\n--verbose\n--version (-V)\n--view-categories"
SHOW_ARGS="commands dbdir help includedir license man options pidfile plugindir profiles release releasedate tests version workdir" SHOW_ARGS="commands dbdir help hostids includedir license man options pidfile plugindir profiles release releasedate tests version workdir"
SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands) SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands)
lynis show ${BROWN}dbdir${NORMAL} (database directory) lynis show ${BROWN}dbdir${NORMAL} (database directory)
lynis show ${BROWN}help${NORMAL} (detailed information about arguments) lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system)
lynis show ${BROWN}includedir${NORMAL} (include directory for tests and functions) lynis show ${BROWN}includedir${NORMAL} (include directory for tests and functions)
lynis show ${BROWN}license${NORMAL} (license details) lynis show ${BROWN}license${NORMAL} (license details)
lynis show ${BROWN}man${NORMAL} (show help) lynis show ${BROWN}man${NORMAL} (show help)
@ -160,6 +161,10 @@ if [ $# -gt 0 ]; then
fi fi
;; ;;
"helpers") for I in ${HELPERS}; do ${ECHOCMD} ${I}; done ;; "helpers") for I in ${HELPERS}; do ${ECHOCMD} ${I}; done ;;
"hostids" | "hostid")
${ECHOCMD} "hostid=${HOSTID}"
${ECHOCMD} "hostid2=${HOSTID2}"
;;
"includedir") "includedir")
${ECHOCMD} "${INCLUDEDIR}" ${ECHOCMD} "${INCLUDEDIR}"
;; ;;