On Tuesday 26 September 2017 15:43:35 Greg Wooledge wrote:

> On Tue, Sep 26, 2017 at 03:33:48PM -0400, Gene Heskett wrote:
> > > > nameserver 192.168.XX.1
> > > > search     host dns
> > > > domain     coyote.den
> >
> > I started with Red Hat 5.0, in the late '90's. And it looks like
> > stretch may have deprecated the executable, locate can only find the
> >  .conf files, one in /etc, and one in 
> > /usr/share/libc-bin/nsswitch.conf. Maybe its something libc-bin
> > uses? They are identical FWTW.
>
> From Red Hat 5.2 (Apollo) resolver(5):
>
>
> NAME
>      resolver - resolver configuration file
>
> SYNOPSIS
>      /etc/resolv.conf
>
> ...
>      search   Search list for host-name lookup.  The search list is
> normally determined from the local domain name; by default, it
> contains only the local domain name.  This may be changed by listing
> the desired domain search path following the search keyword with
> spaces or tabs separating the names.  Most resolver queries will be
> attempted using each component of the search path in turn un- til a
> match is found.  Note that this process may be slow and will generate
> a lot of network traffic if the servers for the listed domains are not
> local, and that queries will time out if no server is available for
> one of the domains.
>
>               The search list is currently limited to six domains with
> a total of 256 characters.
> ...
> 4th Berkeley Distribution      November 11, 1993                      
>       1
>
>
> I still think you're carrying along some mistake that you made decades
> ago, which has simply never caused any problems, but is also not doing
> anything beneficial.  But if you can tell us *which* man page you saw
> this in, that would be of interest.
>
> P.S. there's nothing new in stretch here.  Even the wheezy man page
> for resolv.conf(5) looks basically the same as stretch's.  Compare:
>
> https://manpages.debian.org/wheezy/manpages/resolv.conf.5.en.html
> https://manpages.debian.org/stretch/manpages/resolv.conf.5.en.html

For stretch, I'm looking at the manpage from an arm64 based card.  And 
I've checked the rest of the mostly wheezy machines. The first machine, 
running my G0704 had:
order hosts nameserver

and its worked well that way for 2 years. But I changed it out for 
search etc etc anyway.

next is the ark/intel shoebox running a small Chinese 7x12 lathe I call 
lathe, affectionately known as TLM, for The Little Monster, it has a 1 
hp spindle motor and is forever breaking drive parts.

It has only one line, the nameserver address in the router, which must 
know about the local net as it can ping the rest of the machines just 
fine.  So that one is wrong, and its been wrong since sometime in July 
2015. I really ought to fix it.  But it also Just Works(TM).

Next is a small 4 axis milling machine called shop. It has:
search hosts,dns
nameserver 192.168.71.1

note comma, wrong according to the man page as its says spaces or tabs 
for separators. But its been that way since the last install in  July 
2015.

No problems that have made me question the net config in the last 27 
months.

Next, back in the garage, where a raspberry pi 3b is currently running a 
much bigger Sheldon lathe. Its running jessie. And says:
search hosts,dns
nameserver 192.168.71.1

Note comma, which the man page says is wrong. But it, like the other 4, 
works.

And finally from the stretch install on a rock64 that I hope can replace 
the pi:
rock64@rock64Sheldon:/usr/share/man$ cat /etc/resolv.conf
## screw dhcpd, can't find its ass with both hands!
domain coyote.den
nameserver 192.168.71.1
search  hosts   nameserver

 But the network stuff there is doofy, I have to specify the gateway 
twice to actually get it into the route -n output.
cat /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet static
address 192.168.71.2/24
gateway 192.168.71.1
up route add default gw 192.168.71.1

If I remove either of the last 2 lines, no gateway. And I haven't a clue.

So theres at least 3 variations on this theme, all of which work.
And I found I can't run a calculator and parted at the same time. So when 
I told mkswap to make swap on the 2nd partition on a terabyte drive, 
which I thought I'd set to 2GB, twice its memory, when I got around to 
doing a mkswap, and adding it to /etc/fstab, then doing a swapon -a, 
imagine my surprise to see htop telling me I had 7532MB of swap. But it 
has drive to throw away anyway.  Shrug. :)

And the stretch man page is the same as wheezy's ANAICT. The final 
paragraph:

 The domain and search keywords are mutually exclusive.  If more than one 
instance of these keywords is present, the last instance wins.

       The search keyword of a system's resolv.conf file can be 
overridden on a per-process basis by setting the environment variable 
LOCALDOMAIN to a space-separated list
       of search domains.

       The  options  keyword of a system's resolv.conf file can be 
amended on a per-process basis by setting the environment variable 
RES_OPTIONS to a space-separated list
       of resolver options as explained above under options.

       The keyword and value must appear on a single line, and the 
keyword (e.g., nameserver) must start the line.  The value  follows  the  
keyword,  separated  by  white space

So obviously theres more than one ironclad rule as to how to skin this 
cat, and the final question is:  Does it work? Yes.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to