Merge pull request #1076 from Varbin/1075-solaris-hostid

Use first e1000 interface and break after match (for hostid generation on Solaris)
This commit is contained in:
Michael Boelen 2020-12-15 14:10:34 +01:00 committed by GitHub
commit d1d3882130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1089,12 +1089,13 @@
;;
"Solaris")
INTERFACES_TO_TEST="e1000g1 net0"
INTERFACES_TO_TEST="net0 e1000g1 e1000g0"
FOUND=0
for I in ${INTERFACES_TO_TEST}; do
FIND=$(${IFCONFIGBINARY} -a | grep "^${I}")
if [ ! "${FIND}" = "" ]; then
FOUND=1; LogText "Found interface ${I} on Solaris"
break
fi
done
if [ ${FOUND} -eq 1 ]; then
@ -1107,7 +1108,7 @@
ReportException "GetHostID" "Can not find sha1/sha1sum or openssl"
fi
else
ReportException "GetHostID" "No interface found op Solaris to create HostID"
ReportException "GetHostID" "No interface found on Solaris to create HostID"
fi
;;