Gentoo Archives: gentoo-user

From: Zac Slade <krakrjak@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: DNSDOMAIN in /etc/conf.d/domainname has no effect? (was: [gentoo-user] "hostname -d" returns no domainname)
Date: Fri, 26 May 2006 16:08:28
Message-Id: 200605261100.06772.krakrjak@volumehost.net
In Reply to: DNSDOMAIN in /etc/conf.d/domainname has no effect? (was: [gentoo-user] "hostname -d" returns no domainname) by Alexander Skwar
1 On Friday 26 May 2006 08:25, Alexander Skwar wrote:
2 > Bo Ørsted Andresen wrote:
3 > > Friday 26 May 2006 10:46 skrev Etaoin Shrdlu:
4 > >> I seem to remember that this was somehow related to /etc/hosts, look:
5 > >>
6 > >> # cat /etc/hosts
7 > >
8 > > Changing:
9 > >> 10.0.0.10 mybox mybox.my.domain
10 > >
11 > > to:
12 > >> 10.0.0.10 mybox.my.domain mybox
13 > >
14 > > has just solved this issue for me. :) Thanks!
15 Here is why this solved the issue for you. hostname -d and hostname --fqdn
16 get the domain part by using gethostbyname() so it does a DNS lookup on your
17 hostname. If your /etc/hosts.conf is set to files, bind then it will look
18 your hostname up in /etc/hosts then query DNS. If your /etc/hosts file has
19 an FQDN entry for your hostname then all is well. If not then your hostname
20 is queried in DNS using the domain statement in /etc/resolv.conf.
21
22 > But I wonder what this DNSDOMAIN setting in /etc/conf.d/domainname is
23 > supposed to do. Because of
24 It sets the domain in /etc/resolv.conf
25
26 > # When setting up resolv.conf, what should take precedence?
27 > # If you wish to always override DHCP/whatever, set this to 1.
28 > OVERRIDE=1
29 >
30 > I thought that this setting would have an effect. Seems not so...
31 This will determin whether DHCP will be allowed to replace your domain
32 statement in /etc/resolv.conf.
33
34 I hope this clears it up.
35 --
36 Zac Slade
37 krakrjak@××××××××××.net
38 ICQ:1415282 YM:krakrjak AIM:ttyp99
39
40 --
41 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: DNSDOMAIN in /etc/conf.d/domainname has no effect? Alexander Skwar <listen@×××××××××××××××.name>