Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Misconfigured system
Date: Sun, 24 Dec 2006 12:16:42
Message-Id: 200612241209.16077.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] Misconfigured system by David Relson
1 On Friday 22 December 2006 12:20, David Relson wrote:
2 > On Thu, 21 Dec 2006 21:45:07 -0800
3 > Kevin O'Gorman wrote:
4 >
5 > ...[snip]...
6 >
7 > > Oops. I should have known I could answer my own question with a
8 > > little more digging. I now see that there's
9 > > hostname
10 > > hostname --fqdn
11 > > dnsdomainname
12 > > and they all work by looking in /etc/host.conf, and if (as is true
13 > > here) that says
14 > > to use the hosts file first, it looks for it in /etc/hosts, which has
15 > > the fqdn. I seem to dimly recall that it actually looks for the first
16 > > non-comment, but that
17 > > cannot be quite right, because localhost comes first in my copy.
18 > > Maybe it's the first
19 > > routable IP number?
20 > >
21 > > I think this sub-problem is solved. I've commented my config files a
22 > > bit more, so I
23 > > won't make the same mistake again.
24 > >
25 > > ++ kevin
26 >
27 > Now, I'm curious! On my system, I see the following:
28 >
29 > dnsdomainname osagesoftware.com
30 > hostname osage.osagesoftware.com
31 > hostname --fqdn osage.osagesoftware.com
32 >
33 > /etc/hosts contains:
34 >
35 > 192.168.1.10 osage.osagesoftware.com osage
36 >
37 > "strace -feopen" shows that /etc/hosts is opened by "hostname --fqdn"
38 > but not "hostname".
39 >
40 > What have I got wrong?
41 >
42 > Regards,
43 >
44 > David
45 >
46 > P.S. Greetings from one Kiewit alumni to another ...
47
48 I discovered that the order of entries on the localhost line is important to
49 avoid hostname being identified as "none". I suppose in your system it
50 should be:
51
52 127.0.0.1 osage.osagesoftware.com osage localhost
53
54 HTH
55 --
56 Regards,
57 Mick

Replies

Subject Author
Re: [gentoo-user] Misconfigured system David Relson <relson@×××××××××××××.com>