Gentoo Archives: gentoo-user

From: Andrey Gerasimenko <gak@××××××.ru>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Misconfigured system
Date: Sun, 24 Dec 2006 16:37:44
Message-Id: op.tk2n59ljv2ynd8@gaktux.gakdomain
In Reply to: Re: [gentoo-user] Misconfigured system by David Relson
1 On Sun, 24 Dec 2006 17:08:14 +0300, David Relson
2 <relson@×××××××××××××.com> wrote:
3
4 > On Sun, 24 Dec 2006 12:09:13 +0000
5 > Mick wrote:
6 >
7 > ..[snip]...
8 >> > Now, I'm curious! On my system, I see the following:
9 >> >
10 >> > dnsdomainname osagesoftware.com
11 >> > hostname osage.osagesoftware.com
12 >> > hostname --fqdn osage.osagesoftware.com
13 >> >
14 >> > /etc/hosts contains:
15 >> >
16 >> > 192.168.1.10 osage.osagesoftware.com osage
17 >> >
18 >> > "strace -feopen" shows that /etc/hosts is opened by "hostname
19 >> > --fqdn" but not "hostname".
20 >> >
21 >> > What have I got wrong?
22 >> >
23 >> > Regards,
24 >> >
25 >> > David
26 >> >
27 >> > P.S. Greetings from one Kiewit alumni to another ...
28 >>
29 >> I discovered that the order of entries on the localhost line is
30 >> important to avoid hostname being identified as "none". I suppose in
31 >> your system it should be:
32 >>
33 >> 127.0.0.1 osage.osagesoftware.com osage localhost
34 >
35 > Curiouser and curiouser...
36 >
37 > Using your suggested line as the complete content of my /etc/hosts file
38 > has _no_ effect at all.
39 >
40 > As an experiment, I tried modifying /etc/conf.d/hostname to have just
41 > a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
42 > system was not at all happy with that.
43 > ### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname
44 >
45 > osagexxx
46 > hostname: Unknown host
47 > hostname: Unknown host
48 > dnsdomainname: Unknown host
49 >
50
51 As far as I understand, with modersn scripts the hostname is returned by
52 the /etc/init.d/hostname service, which gets the host name from
53 /etc/conf.d/hostname, whicj should have a line like
54
55 HOSTNAME="osage"
56
57 The domainname is set by domainname as
58
59 #domainname osagesoftware.com
60
61 After that, according to man hostname, FQDN will be
62 osage.osagesoftware.com when osage can be resolved, either by the real DNS
63 server or by 129.0.0.1 osage.osagesoftware.com inhosts.
64
65 Hope that helps. I recall I examined that after Gentoo setup according to
66 the handbook displayed unknowndomain before the login prompt.
67
68 --
69 Andrei Gerasimenko
70
71 --
72 gentoo-user@g.o mailing list