Merge pull request #941 from iain-cuthbertson-siftware/bugfix/allow-mixed-case-hostnames

Adds uppercase option to the hostname validation regex
This commit is contained in:
Michael Boelen 2020-06-02 18:50:35 +02:00 committed by GitHub
commit 2398c74783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@
LogText "Result: hostnamed is defined and not longer than 63 characters" LogText "Result: hostnamed is defined and not longer than 63 characters"
fi fi
# Test valid characters (normally a dot should not be in the name, but we can't be 100% sure we have short name) # 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\.\-]') FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[a-zA-Z0-9\.\-]')
if [ -z "${FIND}" ]; then if [ -z "${FIND}" ]; then
LogText "Result: good, no unexpected characters discovered in hostname" LogText "Result: good, no unexpected characters discovered in hostname"
if IsVerbose; then Display --indent 2 --text "- Hostname (allowed characters)" --result "${STATUS_OK}" --color GREEN; fi if IsVerbose; then Display --indent 2 --text "- Hostname (allowed characters)" --result "${STATUS_OK}" --color GREEN; fi