Added HP-UX routine for GetHostID

This commit is contained in:
Michael Boelen 2017-10-19 19:37:25 +02:00
parent db8f259676
commit 9d238f6e78
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 13 additions and 0 deletions

View File

@ -867,6 +867,19 @@
fi
;;
"HP-UX")
FIND=$(nwmgr -q info -c lan0 2> /dev/null | awk '{ if ($1=="MAC" && $2=="Address") { print $4 }}')
if HasData "${FIND}"; then
if [ ! -z "${OPENSSLBINARY}" ]; then
HOSTID=$(echo ${FIND} | ${OPENSSLBINARY} sha -sha1 | awk '{ print $2 }')
else
ReportException "GetHostID" "No openssl binary available on this HP-UX system"
fi
else
ReportException "GetHostID" "No MAC address found by using nwmgr"
fi
;;
"Linux")
# Define preferred interfaces
#PREFERRED_INTERFACES="eth0 eth1 eth2 enp0s25"