diff options
author | mboelen <michael@cisofy.com> | 2014-09-19 18:43:20 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-19 18:43:20 +0400 |
commit | d99dbc7406dd6b570e90a41c001fc152c627873f (patch) | |
tree | 8b4ba9a3ca2f4460b789b222e8f13912ae95c76b | |
parent | f5dcb5e7f197f95e0acbd4576119726e3d5cde8a (diff) |
Added detection for machine ID
-rw-r--r-- | include/functions | 11 |
1 files changed, 11 insertions, 0 deletions
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 |