Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 147380

Summary: funny entries in /etc/hosts
Product: Gentoo Release Media Reporter: Dustin J. Mitchell <dustin>
Component: StagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED CANTFIX    
Severity: normal CC: saibot834, wolf31o2
Priority: High    
Version: unspecified   
Hardware: All   
OS: Other   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dustin J. Mitchell 2006-09-12 14:31:03 UTC
On a wide range of boxes, I have strange entries appearing in /etc/hosts.  I would expect that this is caused by something funny that Portage is doing, but I can't find any details.  Entries are:

on a bunch of boxes
10.10.10.1      pitr-int
10.10.10.2      dustpuppy-int
10.10.10.3      poseidon-int
134.68.220.30   toucan

and on a different box:
192.168.0.2     gravity.twi-31o2.org gravity

the first bunch of boxes are on two completely unrelated networks, neither of which is in the 10./8 network; the second is in a 172.16.1/24 subnet.  I understand that toucan is the Gentoo mail server, but why's it in /etc/hosts?

Google returns very little, other than a tangential reference to FTP by someone who is otherwise fairly confused.

It looks like these are harmless, but what are they and can I delete them?
Comment 1 David Li 2006-09-12 14:56:30 UTC
Are you using dhcpcd and ntp by any chance?
Comment 2 Dustin J. Mitchell 2006-09-12 15:04:40 UTC
Yes -- how does that relate?
Comment 3 David Li 2006-09-12 15:19:32 UTC
dhcpcd will automatically add entries to hosts if you don't tell it not to.

You need to use something like:
dhcpcd_eth0="-N"
in /etc/conf.d/net in order to tell it not to.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-09-13 00:05:34 UTC
Just delete them, leftover from building stages. :) wolf31o2 could give you more info, maybe :)
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-13 08:19:34 UTC
As a feature for building stages/livecds, catalyst pulls in the build system's /etc/hosts file.  This allows for using things like local mirrors and such on a network that might not have DNS.  Anyway, this is supposed to be replaced with the backup copy that catalyst makes, hosts.bck, but there was a bug in catalyst that caused this to not happen.  As such, it kept the host entries from the build machines in the tarballs.  This has since been fixed, and really was a cosmetic problem, anyway.
Comment 6 Dustin J. Mitchell 2006-09-13 09:46:39 UTC
Great, thanks, and hopefully other concerned users will find this bug entry! :)
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-06-17 13:51:59 UTC
*** Bug 182330 has been marked as a duplicate of this bug. ***
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-06-17 13:52:40 UTC
Chris, you did it again? :P
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-06-19 01:17:43 UTC
No, I did not.  No user using the 2007.0 stages would have gcc 3.4.6 installed.  The user in question upgraded, and probably just noticed this.  The bug was fixed in catalyst a long time ago.