diff --git a/include/functions b/include/functions index fd47cd3d..63cc4864 100644 --- a/include/functions +++ b/include/functions @@ -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 }')