mirror of https://github.com/CISOfy/lynis.git
Added detection for machine ID
This commit is contained in:
parent
f5dcb5e7f1
commit
d99dbc7406
|
@ -476,6 +476,17 @@
|
|||
report "exception[]=No SHA1/SHA1SUM binary found to create HOSTID"
|
||||
fi
|
||||
|
||||
# Search machine ID
|
||||
# This applies to IDs generated for systemd
|
||||
# Optional: DBUS creates ID as well with dbus-uuidgen and is stored in /var/lib/dbus-machine-id (might be symlinked to /etc/machine-id)
|
||||
sMACHINEIDFILE="/etc/machine-id"
|
||||
if [ -f ${sMACHINEIDFILE} ]; then
|
||||
FIND=`head -1 ${sMACHINEIDFILE} | grep "^[a-f0-9]"`
|
||||
if [ "${FIND}" = "" ]; then
|
||||
MACHINEID="${FIND}"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# Insert section block
|
||||
|
|
Loading…
Reference in New Issue