From d99dbc7406dd6b570e90a41c001fc152c627873f Mon Sep 17 00:00:00 2001 From: mboelen Date: Fri, 19 Sep 2014 16:43:20 +0200 Subject: Added detection for machine ID --- include/functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/functions b/include/functions index 2a18bde8..7bef6120 100644 --- a/include/functions +++ b/include/functions @@ -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 -- cgit v1.2.3