diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-10-19 20:37:25 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-10-19 20:37:25 +0300 |
commit | 9d238f6e788b51aa873fd3ad8d982dd8a46fbee2 (patch) | |
tree | 4986b07b8270dfc0b87f1438b90e8cfbd4c1d6b7 | |
parent | db8f259676e2599161279ea556a9ccecc5cf5636 (diff) |
Added HP-UX routine for GetHostID
-rw-r--r-- | include/functions | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/functions b/include/functions index e4036825..65287143 100644 --- a/include/functions +++ b/include/functions @@ -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" |