Gentoo Archives: gentoo-user

From: Kevin O'Gorman <kogorman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Misconfigured system
Date: Sun, 24 Dec 2006 16:14:05
Message-Id: 9acccfe50612240803i3a0a4530m6f5fd9ae28437c8e@mail.gmail.com
In Reply to: Re: [gentoo-user] Misconfigured system by David Relson
1 On 12/24/06, David Relson <relson@×××××××××××××.com> wrote:
2 > On Sun, 24 Dec 2006 12:09:13 +0000
3 > Mick wrote:
4 >
5 > ...[snip]...
6 > > > Now, I'm curious! On my system, I see the following:
7 > > >
8 > > > dnsdomainname osagesoftware.com
9 > > > hostname osage.osagesoftware.com
10 > > > hostname --fqdn osage.osagesoftware.com
11 > > >
12 > > > /etc/hosts contains:
13 > > >
14 > > > 192.168.1.10 osage.osagesoftware.com osage
15 > > >
16 > > > "strace -feopen" shows that /etc/hosts is opened by "hostname
17 > > > --fqdn" but not "hostname".
18 > > >
19 > > > What have I got wrong?
20 > > >
21 > > > Regards,
22 > > >
23 > > > David
24 > > >
25 > > > P.S. Greetings from one Kiewit alumni to another ...
26 > >
27 > > I discovered that the order of entries on the localhost line is
28 > > important to avoid hostname being identified as "none". I suppose in
29 > > your system it should be:
30 > >
31 > > 127.0.0.1 osage.osagesoftware.com osage localhost
32 >
33 > Curiouser and curiouser...
34 >
35 > Using your suggested line as the complete content of my /etc/hosts file
36 > has _no_ effect at all.
37 >
38 > As an experiment, I tried modifying /etc/conf.d/hostname to have just
39 > a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
40 > system was not at all happy with that.
41 >
42 > ### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname
43 >
44 > osagexxx
45 > hostname: Unknown host
46 > hostname: Unknown host
47 > dnsdomainname: Unknown host
48
49 As the OP, I checked this out.
50
51 Right now, the first two non-comment lines in /etc/hosts are
52 127.0.0.1 localhost
53 64.166.164.49 treat.kosmanor.com treat
54
55 Adding stuff to the localhost line has no effect.
56 Fooling with the 64...... line does. The first thing after the IP
57 seems to be taken as the
58 FQDN by "hostname --fqdn", so the order on the line is important.
59
60 Neither of these affects the results of "hostname", although I did not
61 reboot to test the
62 theory that this might make a difference. It seems more likely this comes from
63 /etc/conf.d/hostname
64
65 ++ kevin
66
67 --
68 Kevin O'Gorman, PhD
69 --
70 gentoo-user@g.o mailing list