Bug 531702 - hostname -s behaviour should be consistent with other UNIXes
Summary: hostname -s behaviour should be consistent with other UNIXes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: net-tools
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-29 08:47 UTC by Jiri Popelka
Modified: 2009-11-12 01:00 UTC (History)
3 users (show)

Fixed In Version: 1.60-95.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of: 319981
Environment:
Last Closed: 2009-11-12 01:00:02 UTC
Type: ---


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 552482 0 None None None Never

Description Jiri Popelka 2009-10-29 08:47:48 UTC
Description of problem:
hostname -s
on a host with a host name that does not resolve in the DNS
behaves differently on Fedora as on FreeBSD/OpenBSD/AIX/MacOsX.

On Fedora when the host name does not resolve in the DNS
hostname -s
returns "hostname: Unknown host" message.
 
On FreeBSD/OpenBSD/AIX/MacOsX when the host name does not resolve in the DNS
hostname -s
returns short host name (no matter if the host name resolves or not).

hostname man page does not say anything about whether the hostname should resolve or not.
-s, --short
  Display the short host name. This is the host name cut at the first dot.


Version-Release number of selected component (if applicable):
net-tools-1.60-93.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
run hostname -s on a server whose Fully qualified host name does not resolve in the DNS.
 
Actual results:
[root ~]# hostname some.thing.stupid
[root ~]# hostname
some.thing.stupid
[root ~]# hostname -s
hostname: Unknown host

Expected results:
[root ~]# hostname some.thing.stupid
[root ~]# hostname
some.thing.stupid
[root ~]# hostname -s
some

Comment 1 Fedora Update System 2009-10-29 13:09:25 UTC
net-tools-1.60-94.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/net-tools-1.60-94.fc11

Comment 2 Fedora Update System 2009-11-04 12:36:59 UTC
net-tools-1.60-94.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update net-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-11010

Comment 3 Fedora Update System 2009-11-06 00:08:22 UTC
net-tools-1.60-95.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update net-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-11010

Comment 4 Fedora Update System 2009-11-06 09:55:12 UTC
net-tools-1.60-97.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/net-tools-1.60-97.fc12

Comment 5 Fedora Update System 2009-11-11 14:59:09 UTC
net-tools-1.60-98.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update net-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11140

Comment 6 Fedora Update System 2009-11-12 00:59:52 UTC
net-tools-1.60-95.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.