mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Corrected case where binaries were not checked while we do want to use dmidecode if it available
This commit is contained in:
parent
5f13de96a4
commit
a38e2b535e
1 changed files with 2 additions and 0 deletions
|
|
@ -1774,6 +1774,8 @@
|
|||
# dmidecode
|
||||
# Values: VMware Virtual Platform / VirtualBox
|
||||
if [ -z "${SHORT}" ]; then
|
||||
# Try to find dmidecode in case we did not check binaries (e.g. lynis show environment)
|
||||
if [ ${CHECK_BINARIES} -eq 0 ]; then DMIDECODEBINARY=$(command -v dmidecode 2> /dev/null); fi
|
||||
if [ -n "${DMIDECODEBINARY}" -a -x "${DMIDECODEBINARY}" -a ${PRIVILEGED} -eq 1 ]; then
|
||||
LogText "Test: trying to guess virtualization with dmidecode"
|
||||
FIND=$(${DMIDECODEBINARY} -s system-product-name | awk '{ print $1 }')
|
||||
|
|
|
|||
Loading…
Reference in a new issue