diff --git a/include/functions b/include/functions index 321e2b2d..5428f3da 100644 --- a/include/functions +++ b/include/functions @@ -1029,15 +1029,15 @@ if [ ! -z "${STRING_TO_HASH}" ]; then # Create hashes if [ ! "${SHA256SUMBINARY}" = "" ]; then - HASH_SSH=$(echo ${DATA_SSH} | ${SHA256SUMBINARY} | awk '{ print $1 }') + HASH2=$(echo ${STRING_TO_HASH} | ${SHA256SUMBINARY} | awk '{ print $1 }') HASH_HOSTNAME=$(echo ${HOSTNAME} | ${SHA256SUMBINARY} | awk '{ print $1 }') elif [ ! "${OPENSSLBINARY}" = "" ]; then - HASH_SSH=$(echo ${DATA_SSH} | ${OPENSSLBINARY} sha -sha256 | awk '{ print $2 }') + HASH2=$(echo ${STRING_TO_HASH} | ${OPENSSLBINARY} sha -sha256 | awk '{ print $2 }') HASH_HOSTNAME=$(echo ${HOSTNAME} | ${OPENSSLBINARY} sha -sha256 | awk '{ print $2 }') fi LogText "Hash (hostname): ${HASH_HOSTNAME}" - LogText "Hash (ssh): ${HASH_SSH}" - HOSTID2="${HASH_SSH}" + LogText "Hash (ssh or machineid): ${HASH2}" + HOSTID2="${HASH2}" Report "hostid2=${HOSTID2}" fi fi