Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104579 - automatic append of `domain' entry to resolv.conf by /etc/init.d/domainname script overrides `search' entry
Summary: automatic append of `domain' entry to resolv.conf by /etc/init.d/domainname...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-02 03:50 UTC by a.grahn
Modified: 2005-09-02 05:51 UTC (History)
0 users

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 a.grahn 2005-09-02 03:50:33 UTC
I found out that the `domainname' init script appends a `domain' entry to
/etc/resolv.conf at boot time, whose value it gets from /etc/conf.d/domainname.

As our domain domain consists of several subdomains, I once added a `search'
entry with a list of all subdomains to resolv.conf in order to resolve all hosts
by their first name component.

However, since the `domain' entry overrides the `search' entry if it goes after
(see resolv.conf man page), host resolving does not work!

Therefore, I would like to suggest, that /etc/init.d/domainname appends the
`domain' entry only if there is no search entry in resolv.conf.


Reproducible: Always
Steps to Reproduce:
1. manually delete `domain' entry in resolve.conf
2. reboot
3. try to ping,connect or whatsoever to a host (where only the first component
has been given) belonging to one of the (sub)domains specified in the `search'
key in resolv.conf

Actual Results:  
$ ping foo
ping: unknown host foo

Expected Results:  
ping foo
PING foo.subdomain.topdomain.org (123.456.789.012) 56(84) bytes of data.
64 bytes from foo.subdomain.topdomain.org (123.456.789.012): icmp_seq=1 ttl=64
time=0.343 ms
Comment 1 SpanKY gentoo-dev 2005-09-02 05:51:58 UTC
thats the point of the 'OVERRIDE' setting in conf.d/domainname