You are not logged in.

#1 2017-12-17 18:52:25

royb
Member
Registered: 2017-12-17
Posts: 5

Distribution /etc/hosts empty?

I noticed that my archlinux hosts file is now empty (contains only comments) i.e.

[root@rubicon etc]# cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.

I read in another post to this forum that this is the new/expected behaviour: https://bbs.archlinux.org/viewtopic.php … 2#p1754772

In that case, how should localhost be resolved now, what is the anticipated mechanism?

Currently, for me, DNS is being used. Which seems wrong or at least unexpected (IMO).

nsswitch.conf currently contains:

...
hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
...

I manually merged the above line from nsswitch.conf.pacnew, apparently created by a package upgrade in late October. Previously the file contained:

...
#hosts:	files mdns_minimal [NOTFOUND=return] dns myhostname
hosts:		files dns myhostname
...

If I understand this, adding "mymachines resolve" should make some systemd component responsible for (some) name resolution, am I correct?

Edit: I did some more research, it seems the "myhostname" argument at the end of the hosts entry in nsswitch.conf is meant to provide resolution of localhost (see: man nss-myhostname).
That doesn't seem to be working on my system however. Is this the intended mechanism? Any advice about how to debug the issue further? Other suggestions?

Last edited by royb (2017-12-17 19:40:23)

Offline

#2 2017-12-18 00:58:10

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Distribution /etc/hosts empty?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2017-12-18 11:28:28

royb
Member
Registered: 2017-12-17
Posts: 5

Re: Distribution /etc/hosts empty?

That's my problem alright - Thanks for responding!

Offline

Board footer

Powered by FluxBB