diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-10-16 16:23:47 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-10-16 16:23:47 +0300 |
commit | 99de3bb0b641b756eb5fa1542457ac2b78006500 (patch) | |
tree | cbadaf4d425e5cc3d93915bebfc742b643581da3 /include/helper_show | |
parent | ba6c54023f1d1ebb651a67728377668e519b5a9d (diff) |
Add 'lynis show environment'
Diffstat (limited to 'include/helper_show')
-rw-r--r-- | include/helper_show | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/helper_show b/include/helper_show index b5151807..3d958565 100644 --- a/include/helper_show +++ b/include/helper_show @@ -32,12 +32,13 @@ COMMANDS="audit show update upload-only" HELPERS="audit configure show update" OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--license-key\n--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-from-category\n--tests-from-group\n--upload\n--verbose\n--version (-V)\n--wait" -SHOW_ARGS="categories changelog commands dbdir details groups help hostids includedir language license logfile man options os pidfile plugindir profiles release releasedate report settings tests version workdir" +SHOW_ARGS="categories changelog commands dbdir details environment groups help hostids includedir language license logfile man options os pidfile plugindir profiles release releasedate report settings tests version workdir" SHOW_HELP="lynis show ${BROWN}categories${NORMAL} (display test categories) lynis show ${BROWN}changelog${NORMAL} ${GRAY}[version]${NORMAL} (release details) lynis show ${BROWN}commands${NORMAL} (all available commands) lynis show ${BROWN}dbdir${NORMAL} (database directory) lynis show ${BROWN}details${NORMAL} (display test details from log file) +lynis show ${BROWN}environment${NORMAL} (hardware, virtual machine, or container type) lynis show ${BROWN}groups${NORMAL} (test groups) lynis show ${BROWN}help${NORMAL} (detailed information about arguments) lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system) @@ -230,6 +231,21 @@ if [ $# -gt 0 ]; then fi fi ;; + "environment") + if [ -z "${CONTAINER_TYPE}" ]; then + ${ECHOCMD} "container=0" + else + ${ECHOCMD} "container=1" + ${ECHOCMD} "container-type=${CONTAINER_TYPE}" + fi + if [ ${ISVIRTUALMACHINE} -eq 1 ]; then + ${ECHOCMD} "virtual-machine=1" + ${ECHOCMD} "virtual-machine-type=${VMTYPE}" + else + ${ECHOCMD} "hardware=1" + ${ECHOCMD} "virtual-machine=0" + fi + ;; "groups") ViewGroups ;; @@ -262,6 +278,7 @@ if [ $# -gt 0 ]; then "hostids" | "hostid") ${ECHOCMD} "hostid=${HOSTID}" ${ECHOCMD} "hostid2=${HOSTID2}" + ${ECHOCMD} "machineid=${MACHINEID}" ;; "includedir") ${ECHOCMD} "${INCLUDEDIR}" |