Pierre Machard <email@example.com> writes:
> Anyway I do not understand why this issue is a problem since we
> simply add an alias to localhost. Nobody say that we will remove
> localhost and exchange it by localhost.localdomain.
If what you wanted to do was to add an alias, you should have read the
documentation on how to add an alias without changing the canonical
hostname for 127.0.0.1. This documentation is available in hosts(5).
# This manual page describes the format of the /etc/hosts file. This
# file is a simple text file that associates IP addresses with
# hostnames, one line per IP address. For each host a single line
# should be present with the following information:
# IP_address canonical_hostname aliases
Changing the canonical hostname changes the output of everything that
resolves IP address, including "lsof" and "netstat".
Any script or program dependent on this output need to be checked and
possibly changed if it is to behave as it should. This includes local
scripts created by our users.
It should also be consistent with bind9, and I do _not_ think that
changing bind is the correct way to do things.
iostat:~# getent hosts 127.0.0.1
127.0.0.1 localhost.localdomain localhost iostat
iostat:~# dig -x 127.0.0.1 @localhost
; <<>> DiG 9.2.4 <<>> -x 127.0.0.1 @localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11671
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;184.108.40.206.in-addr.arpa. IN PTR
;; ANSWER SECTION:
220.127.116.11.in-addr.arpa. 604800 IN PTR localhost.
;; AUTHORITY SECTION:
127.in-addr.arpa. 604800 IN NS localhost.
;; ADDITIONAL SECTION:
localhost. 604800 IN A 127.0.0.1
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Fri Oct 7 07:19:19 2005
;; MSG SIZE rcvd: 93
Stig Sandbeck Mathisen