Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

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

Closed
saphoooo opened this issue Jun 25, 2016 · 3 comments
Closed

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

saphoooo opened this issue Jun 25, 2016 · 3 comments
Assignees

Comments

@saphoooo
Copy link

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
Copy link

csoroiu commented Jul 25, 2016

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
Copy link
Collaborator

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

@Govinda-Fichtner
Copy link
Collaborator

Fixed with bde42f6

@saphoooo @csoroiu You can install the new version with

sudo apt-get install device-init=0.1.8

Govinda-Fichtner pushed a commit to hypriot/image-builder-rpi that referenced this issue Aug 2, 2016
fixes issues with host entry that gets added multiple times
hypriot/device-init#23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants