Erik Fair <fair%netbsd.org@localhost> writes:
> On Jul 19, 2013, at 03:34, "Roy Marples" <roy%netbsd.org@localhost> wrote:
>
>> Module Name: src
>> Committed By: roy
>> Date: Fri Jul 19 10:34:51 UTC 2013
>>
>> Modified Files:
>> src/bin/hostname: hostname.1 hostname.c
>>
>> Log Message:
>> Add the following options
>> -A Display the FQDN of each address on all interfaces.
>> -a Display alias name(s) of the host.
>> -d Display the DNS domain.
>> -f Display the FQDN for the hostname.
>> -I Display each IP address on all interfaces.
>> -i Display the IP address(es) for the hostname.
>>
>
> Not to go all Rob Pike on you (cf. "cat -v considered harmful"), but
> what the heck is all this for? The system's hostname is supposed to be
> the FQDN, not the short form (Sun got this wrong), and what the hell
> is hostname doing groveling around in network interfaces? Or talking
> to the DNS?
>
> hostname(1) has one job: set/get the system hostname.
>
> Does some other (*cough* Linux) system do these other things that we
> maybe might need to be … "compatible" with it for scripts?
Good points and I'm curious too. I've always viewed hostname(1) to be a
thin wrapper about {get,set}hostname, and *not connected at all* to the
IP networking stack.
Also, "IP" means 4, or 6, or both, and what about other protocols?
Attachment:
pgpIGq6qVuYOm.pgp
Description: PGP signature