[Hostname-devel] hostname -s behaviour should be consistent with other unixes (and with documentation)

Jiri Popelka jpopelka at redhat.com
Wed Oct 21 09:39:35 UTC 2009


Dear Debian Hostname Team,

I'm net-tools and hostname (we have hostname still in net-tools package)
package maintainer in Red Hat.
I'd like to consult some bug (feature request) with you.

As you can see in
https://bugzilla.redhat.com/show_bug.cgi?id=319981
the reporter of the bug claims that
hostname -s
on a host with a hostname that does not resolve in the DNS
behaves in one way on Red Hat Enterprise Linux (and on Debian as I tried)
and in the other way on FreeBSD/OpenBSD/AIX/MacOsX.

On RHEL(Fedora) and Debian when the hostname does not resolve in the DNS
hostname -s
returns "hostname: Unknown host" message.

On FreeBSD/OpenBSD/AIX/MacOsX when the hostname does not resolve in the DNS
hostname -s
returns (according to the reporter) short host name (no matter if the hostname resolves or not).

I'm ready to change the hostname -s functionality to make the behaviour consistent with
other versions of unix (*BSD, AIX, MacOsX, ...) but only in case you decide to change it too,
so it will be consistent also with Debian (and Debian based distros).

Fix should be easy and I'm adding proposed patch.

Also found bug on launchpad
https://bugs.launchpad.net/ubuntu/+source/hostname/+bug/389602
where reporter also says that:
"The documentation states that -s just trims the domain off if it exists, but that's not what it does.
Either it should behave exactly that way or the doc should be updated."

So what do you think about it ?
Should I fill a bug on http://bugs.debian.org/hostname so we can track our discussion on this topic ?

Thanks for your suggestions

Jiri Popelka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostname-short.patch
Type: text/x-patch
Size: 1116 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/hostname-devel/attachments/20091021/4e051f05/attachment.bin>


More information about the Hostname-devel mailing list