On Aug 11, 2011, at 1:32 AM, Roy Marples wrote: > Hi Alex > > On 11/08/2011 06:30, Alex Apke wrote: >>> domain is missing because search supersedes it. Any domain entries are >>> silently merged with the search option. Is there a problem with this? >>> >> From a resolver search standpoint, there is no problem appending the >> domain entry to search field. But I believe the domain value in >> resolv.conf is used to set the machine's domain name (hostname -d), >> this is now lost in openresolv compared to what resolvconf did. >> >> I have a server with a default internal IP address, and a local name >> defined in /etc/hosts for one network interface, but the second >> interface is on the public network. So I want the domain name of the >> server to be set to the public name, not the default internal one. > > According to hostname(1) the DNS domain name is fetched via getaddrinfo(3) > which in turn just used the information in /etc/resolv.conf > > Also, note this in resolv.conf(5) > The domain and search keywords are mutually exclusive. If more than > one instance of these keywords is present, the last instance wins.
So that means that having a domain entry listed before search gives the desired behavior, I am looking for. With the original sample I used for opening the ticket, this is the expected layout: # Generated by resolvconf domain example.com search foo bar example.com nameserver 127.0.0.1 nameserver 192.168.0.2 nameserver 8.8.8.8 nameserver 8.8.4.4 options timeout:5 sortlist 130.155.160.0/255.255.240.0 130.155.0.0 The resolver will ignore domain, and use search, which will have the domain appended to it. > Lastly, looking over the original resolvconf code it just merges it all into > search as well so openresolv is mirroring the behavior. I could have sworn the behavior was different. Perhaps I had kept domain in as a static entry for resolvconf, that kept domain entry in the file. >>> The eth0 and eth1 stanza's you mention are example files sent to >>> resolv.conf - not the final /etc/resolv.conf that ends up. Which local >>> resolver are you using? Some require a little configuration to use >>> openresolv. >>> >> I have bind9 running locally, and am using the libc resolver, so >> there shouldn't be too much extra needed. > > AFAIK bind9 on Debian doesn't have any resolvconf hooks other than sending > the loopback address as a nameserver to resolvconf. So to get the stanzas > working as described on my homepage, you'll need to configure > /etc/resolvconf.conf to write out two files for named and update your named > configuration to include these two files. See the below links for details. > > http://roy.marples.name/projects/openresolv/wiki/OpenResolvConfig > http://roy.marples.name/projects/openresolv/wiki/OpenResolvConfigBind > > You should note that the sample Bind config listed probably isn't suitable > for Debian - it just serves as an example of how to include the two files > needed. > Thanks > > Roy I will have a look at those configs, thanks. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org