-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
myhostname: should recommend installing it before dns/resolve? #1280
Copy link
Copy link
Closed
Description
Having myhostname after dns/resolve in nsswitch.conf presents the following problems:
- If
/etc/hostsis empty/nonexistent, querying forlocalhostwill ask dns first, which does not seem reasonable. - Querying for
*.localhostwill always ask dns first. - Querying the local configured hostname or any subdomain will query dns first.
- Plenty of programs want to know the fqdn, so if the connection is flaky/slow but not dead you get (possibly very long) delays in resolving it.
The manpage suggests problem 3 is by design, but then if I'm using a local dns to resolve local hostnames, why do I want myhostname for?
I think myhostname should be recommended to be configured before dns, and note problem 3 in the manpage so that people can move it last if they need to. I can prepare a PR if you think the change should be made.
Reactions are currently unavailable