Dňa 07. jan 2003 o 20:24, Buchan Milne napísal(a): > This seems correct according to the hosts (5), as such : > > 127.0.0.1 localhost.localdomain localhost > (as it is currently by default) is incorrect, > > 127.0.0.1 localhost > is correct, and > 127.0.0.1 localhost localhost.localdomain > is acceptable.
there is two separate things. one is order of entries in /etc/hosts file. there is imho authoritative BSD man pages, where we can see: cite from man 5 hosts: The hosts file contains information regarding the known hosts on the net- work. For each host a single line should be present with the following information: Internet address official host name aliases this is from FreeBSD man page. similar we can see in NetBSD hosts man page: For each host a single line should be present with the following informa- tion: address hostname [alias ...] These are: address Internet address hostname Official host name alias Alias host name and, off course in man pages which is included in mandrake: For each host a single line should be present with the following information: IP_address canonical_hostname aliases there is crystal clear how we wrote any /etc/hosts entries. but we will see, that we don't know what is proper canonical (official) hostname for localhost. > I haven't looked at the RFCs, but I suspect localhost.localdomain only > came into existence with RH, and 'localdomain' is the correct FQDN for > 127.0.0.1 yes, this is second thing, which is important in this issue. if i search in rfc's right, there is no strictly defined, what is canonical name for localhost. but we can inspired with RFC1912, where is described common configuration errors related do DNS system. there are not one note that localhost is cannonical name. i mean this line: localhost. IN A 127.0.0.1 in this documment is no allusion about localdomain, and localhost.localdomain hostnames, or domains.. if i can imagine what solution would be right, i mean that right record for loopback address can be like this: 127.0.0.1 localhost 127.0.0.1 localhost.localdomain i know, this is duplicity, but second entry is maybe needed for another application for compatibility?? and it works with 'getent' right. if we inspired with NetBSD, there is only first line, without localdomain.. if developers can change hosts file, there is possible right time to add IPV6 adress of loopback too: ::1 localhost -- Linux 2.4.20-2mdk Mandrake Linux release 9.1 (Cooker) for i586 21:58:37 up 8 days, 5:22, 8 users, load average: 1.00, 1.00, 1.00
msg85159/pgp00000.pgp
Description: PGP signature