Bug 531702 - hostname -s behaviour should be consistent with other UNIXes
hostname -s behaviour should be consistent with other UNIXes
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: net-tools (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-29 04:47 EDT by Jiri Popelka
Modified: 2009-11-11 20:00 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.60-95.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 319981
Environment:
Last Closed: 2009-11-11 20:00:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Debian BTS 552482 None None None Never

  None (edit)
Description Jiri Popelka 2009-10-29 04:47:48 EDT
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 09:09:25 EDT
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 07:36:59 EST
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-05 19:08:22 EST
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 04:55:12 EST
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 09:59:09 EST
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-11 19:59:52 EST
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.