mirror of https://github.com/CISOfy/lynis.git
Removed unneeded complexity regarding dmidecode, as binary checks are already done at this point
This commit is contained in:
parent
4ff61a6f46
commit
53ad72e791
|
@ -1774,14 +1774,9 @@
|
|||
# dmidecode
|
||||
# Values: VMware Virtual Platform / VirtualBox
|
||||
if [ -z "${SHORT}" ]; then
|
||||
if [ -x /usr/bin/dmidecode ]; then DMIDECODE_BINARY="/usr/bin/dmidecode"
|
||||
elif [ -x /usr/sbin/dmidecode ]; then DMIDECODE_BINARY="/usr/sbin/dmidecode"
|
||||
else
|
||||
DMIDECODE_BINARY=""
|
||||
fi
|
||||
if [ ! "${DMIDECODE_BINARY}" = "" -a ${PRIVILEGED} -eq 1 ]; then
|
||||
if [ -n "${DMIDECODEBINARY}" -a -x "${DMIDECODEBINARY}" -a ${PRIVILEGED} -eq 1 ]; then
|
||||
LogText "Test: trying to guess virtualization with dmidecode"
|
||||
FIND=$(/usr/sbin/dmidecode -s system-product-name | awk '{ print $1 }')
|
||||
FIND=$(${DMIDECODEBINARY} -s system-product-name | awk '{ print $1 }')
|
||||
if [ -n "${FIND}" ]; then
|
||||
LogText "Result: found ${FIND}"
|
||||
SHORT="${FIND}"
|
||||
|
@ -1794,6 +1789,7 @@
|
|||
else
|
||||
LogText "Result: skipped dmidecode test, as we already found machine type"
|
||||
fi
|
||||
|
||||
# Other options
|
||||
# SaltStack: salt-call grains.get virtual
|
||||
# < needs snippet >
|
||||
|
|
Loading…
Reference in New Issue