mirror of https://github.com/CISOfy/lynis.git
Make NAME-4404 case-insensitive
This commit is contained in:
parent
2b95019b62
commit
e40a3562fb
|
@ -619,7 +619,7 @@
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
LogText "Test: Check /etc/hosts contains an entry for this server name"
|
LogText "Test: Check /etc/hosts contains an entry for this server name"
|
||||||
if [ -f /etc/hosts ]; then
|
if [ -f /etc/hosts ]; then
|
||||||
sFIND=`egrep -v '^(#|$|^::1\s|localhost)' /etc/hosts | grep ${HOSTNAME}`
|
sFIND=`egrep -v '^(#|$|^::1\s|localhost)' /etc/hosts | grep -i ${HOSTNAME}`
|
||||||
if [ "${sFIND}" != "" ]; then
|
if [ "${sFIND}" != "" ]; then
|
||||||
LogText "Result: Found entry for ${HOSTNAME} in /etc/hosts"
|
LogText "Result: Found entry for ${HOSTNAME} in /etc/hosts"
|
||||||
Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result OK --color GREEN
|
Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result OK --color GREEN
|
||||||
|
|
Loading…
Reference in New Issue