[NETW-2400] Improved logging

This commit is contained in:
Michael Boelen 2020-04-04 15:56:00 +02:00
parent 032bb6988e
commit 9da0665929
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,7 @@
if IsVerbose; then Display --indent 2 --text "- Hostname (FQDN length)" --result "${STATUS_UNKNOWN}" --color YELLOW; fi
else
# Fine
LogText "Result: FQDN is defined and shorter than 253 characters (${#FQDN} characters)"
LogText "Result: FQDN is defined and not longer than 253 characters (${#FQDN} characters)"
if IsVerbose; then Display --indent 2 --text "- Hostname (FQDN length)" --result "${STATUS_OK}" --color GREEN; fi
fi
# Now test short hostname
@ -66,6 +66,8 @@
if [ ${#HOSTNAME} -gt 63 ]; then
LogText "Result: hostname is more than 63 characters"
Display --indent 2 --text "- Hostname (length)" --result "${STATUS_WARNING}" --color RED
else
LogText "Result: hostnamed is defined and not longer than 63 characters"
fi
# Test valid characters (normally a dot should not be in the name, but we can't be 100% sure we have short name)
FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[a-z0-9\.\-]')