On Aug 11, 2011, at 3:34 AM, Roy Marples wrote: > On 11/08/2011 09:58, Alex Apke wrote: >> 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. > > In the above example, the domain will be foo because it's the first in the > list > > domain foo > search bar foo > domain foo > > That sets the domain to foo and blanks the search list because domain was > last. The libc source code will use the last domain or search statement it > finds and use that for all. So when it comes to the generated resolv.conf > file, having a domain keyword is pretty redundant.
In my original example dns-domain foo is commented out. So here is how I see this all working for libc resolver, and will only show the interfaces & resulting resolv.conf entries for domain & search. 1) interfaces dns-search foo bar dns-domain example.com resolv.conf domain example.com search foo bar example.com 2) interfaces dns-domain foo dns-search bar dns-domain example.com resolv.conf domain example.com search bar foo example.com 3) interfaces dns-search foo dns-domain example.com dns-search bar resolv.conf domain example.com search foo example.com bar 4) interfaces dns-search foo bar dns-search example.com resolv.conf search foo bar example.com In the above, the domain value always gets added to search, but if domain appears in the interfaces file, it should only appear in the resolv.conf once, and always above the search entry. For examples 2 & 3, openresolv could build the search list differently or choose the other domain to be displayed. > > It looks like the behaviour you really want is the correct domain first in > the search list. > You can do this by setting interface_order and/or dynamic_order and/or > search_domains in /etc/resolvconf.conf Sure, as a backup procedure, there is always that, but I still think it would be possible for openresolv to do what I am suggesting above. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org