Set default hostname if none was found

This commit is contained in:
mboelen 2016-03-08 08:16:35 +01:00
parent e9edd2dd09
commit 94d0aaf8d4
1 changed files with 1 additions and 0 deletions

1
lynis
View File

@ -466,6 +466,7 @@
*)
HOSTNAME=`hostname -s 2> /dev/null` ;;
esac
if [ "${HOSTNAME}" = "" ]; then HOSTNAME="no-hostname"; fi
FQDN=`hostname 2> /dev/null`
if [ "${OS}" = "Linux" -a "${HOSTNAME}" = "${FQDN}" ]; then
FQDN=`hostname -f 2> /dev/null`