Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135515 - resolv.conf gets generated wrongly
Summary: resolv.conf gets generated wrongly
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-04 07:14 UTC by Alexander Hoogerhuis
Modified: 2006-06-05 05:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Hoogerhuis 2006-06-04 07:14:52 UTC
When updating /etc/conf.d/domainname and entering a domain name in the DNSDOMAIN line, resolv.conf gets generated like this:

search blah.com
domain blah.com

This is wrong; only "search blah.com" should be generated, as the first key on that line equates to the machines own DNS domain. The domain line is primarily used for NIS/YP operations and is not needed unless the NISDOMAIN line is filled in.

Also, there should be a DNSSEARCHPATH or similar to allow users to have domains appended after the primary DNS domain on the search line.

-A
Comment 1 Hubert Mercier (RETIRED) gentoo-dev 2006-06-04 10:55:38 UTC
Well, I'm not totally sure about that, but I think that the next stable baselayout will differ in the way it deals with resolv.conf. If I understood everything well, the resolv.conf will not be generated anymore by /etc/init.d/domainname script.

Instead, net.eth0 will use a new package : net-misc/resolvconf-gentoo (maybe inspired by the same debian package ?), which should do the job ?
Or maybe I'm just wrong, I don't have much time to verify now ;) But anyway, the new baselayout does not use /etc/init.d/domainname anymore.
Comment 2 Alexander Hoogerhuis 2006-06-04 14:59:06 UTC
As long as it gets the distinction that "domain" is a NIS related directive, and that "search" is DNS related; and that "seach" can take multiple keys, where the first is the machine's primary DNS domain suffix.

-A
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-06-05 05:07:34 UTC
(In reply to comment #2)
> As long as it gets the distinction that "domain" is a NIS related directive,
> and that "search" is DNS related; and that "seach" can take multiple keys,
> where the first is the machine's primary DNS domain suffix.

Read the resolv.conf man page and it clearly states that while search and domain are mutually exclusive neither are NIS related. Infact NIS isn't even mentioned.

the domainmame script has been punted from baselayout-1.12 in favour of conf.d/net controlling resolv.conf like so

dns_domain_lo="foo.com"
dns_search_lo="foo.com bar.com"
dns_servers_lo="127.0.0.1"