mirror of https://github.com/CISOfy/lynis.git
Add 'lynis show environment'
This commit is contained in:
parent
ba6c54023f
commit
99de3bb0b6
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue