hypriot / device-init

Initialize a device on boot with user defined configuration
MIT License
70 stars 17 forks source link

FQDN still reported as localhost #13

Closed leanderjanssen closed 8 years ago

leanderjanssen commented 8 years ago

When running "hostname -f" the fqdn is reported as localhost. This is related to the /etc/hosts file and in particular this line:

127.0.0.1 localhost hostname

When changing this to:

127.0.0.1 localhost 127.0.1.1 hostname

the fqdn is reported correctly.

This is also in line with the Debian reference guide:

https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution