Package: hostname
Version: 2.13

The command 'hostname -s' should return stripped host name as described in
manpage:

       -s, --short
              Display the short host name. This is the host name cut at the
              first dot.

However, hostname -s does not just strip the system hostname until the first
dot, but it searches name services for hostname:

% hostname
fnote
% hostname -s
localhost
% head /etc/hosts
127.0.0.1       localhost               fnote.local     fnote

the 'localhost' is intentionally firsts in /etc/hosts, since 127.0.0.q
should imho always point to 'localhost'.

I expected the 'hostname -s' return string 'fnote' if the system hostname is
set to 'fnote' or the 'fnote.local', but not to search name services.
This is how e.g. FreeBSD's hostname works (-s is the only switch available
at least on FreeBSD-4.11)

If you find my expectation wrong, correct me and sorry for bugging. 

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Nothing is fool-proof to a talented fool. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to