hypriot / device-init

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

Add a new 127.0.0.1 $hostname entry in /etc/hosts on boot time #23

Closed saphoooo closed 8 years ago

saphoooo commented 8 years ago

I've set up my hostname with flash on Hypriot (Version 0.8.0 Barbossa). Each time my Pi is booting, he add a new entry in /etc/hosts: 127.0.0.1 mypi 127.0.0.1 mypi 127.0.0.1 mypi 127.0.0.1 mypi

csoroiu commented 8 years ago

also if you change the hostname the /etc/hosts file will look like: (every reboot adds a new line in etc/hosts file right after the "127.0.0.1 localhost" line, instead of replacing the line with the old hostname, or add one when missing. 127.0.0.1 localhost 127.0.0.1 rpi2 127.0.0.1 rpi2 127.0.0.1 rpi2 127.0.0.1 black-pearl 127.0.0.1 black-pearl ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters

Govinda-Fichtner commented 8 years ago

@csoroiu I will have a look into this soon. Thanks for reporting the issues.

Govinda-Fichtner commented 8 years ago

Fixed with bde42f6b6bc862f7a9cfb3d9b2712addc7d67257

@saphoooo @csoroiu You can install the new version with

sudo apt-get install device-init=0.1.8