Gene Heskett (ghesk...@shentel.net) wrote: > > What *exactly* are you trying to do?
(crickets chirping) > > How does that work? > > By looking its alias up in /etc/hosts. I was using rhetorical devices. If you're truly using a pre-DNS local network, then a lot of what I said simply does not apply to you. > > In the file /etc/resolv.conf there are several different kinds of > > lines that may be present. One of them is the "search" line. > 2 lines in that real file. > > search coyote.den > dnsserver ipv4 address Your first line is valid. Your second line is not. There is no keyword "dnsserver" in resolv.conf(5). DNS resolvers are listed here using the keyword "nameserver". > It hasn't existed since Pottering came on the scene... DHCP client daemons overwriting resolv.conf predate systemd by a lot. This is not a thing that systemd can be blamed for. > avahi and nm may be solutions a lappy user might need. Damned little is > portable here without a multi-ton gantry crane. They are both just > problems waiting to bite me, and to be emasculated by whatever means it > takes. If you don't need them, delete them. > My network was built by me, nothing portable about it, and I don't > understand why a dirt simple, static, /etc/hosts based local network, is > so damned hard to actually make work. It's not! Is that what you want? A local network defined entirely by hosts files? You can do that. It's easy. Just edit your /etc/hosts files to contain the names and addresses of your machines. In this scenario, your resolv.conf file will be used only to look up hosts that live outside of your local network ("in the cloud"). You won't CARE what the default DNS domain name is, because you aren't using it. Your local host lookups will be done by matching the strings that you put in your hosts files. Since you don't care what your resolv.conf file contains, you don't need to jump through all the hoops involved in trying to prevent daemons from overwriting it. Let them. Ignore them. Your hostnames are defined in your hosts files, and nothing will touch those.