mirror of https://github.com/CISOfy/lynis.git
[NETW-2400] Improved logging
This commit is contained in:
parent
032bb6988e
commit
9da0665929
|
@ -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\.\-]')
|
||||
|
|
Loading…
Reference in New Issue