Bug 444262

Summary: hostname(1) w/ options prints "unknown host" error message
Product: [Fedora] Fedora Reporter: Don Buchholz <buchholz>
Component: net-toolsAssignee: Radek Vokál <rvokal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-08 09:17:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Don Buchholz 2008-04-26 07:35:57 UTC
Description of problem:
Using just about any option with hostname(1) results in "unknown host" message.  

Version-Release number of selected component (if applicable):
net-tools-1.60-84.fc8


How reproducible:
always

Steps to Reproduce:
1. execute 'hostname' command w/ just about any option
2.
3.
  
Actual results:
[don@steinbeck ~]$ arglist="-v -s --short -a --alias -i --ip-address -f --fqdn
--long -d --domain -y --yp --nis"
[don@steinbeck ~]$ for a in $arglist ; do echo "% hostname $a" ; hostname $a ; done
% hostname -v
gethostname()=`steinbeck.corp.imoveinc.com'
steinbeck.corp.imoveinc.com
% hostname -s
hostname: Unknown host
% hostname --short
hostname: Unknown host
% hostname -a
hostname: Unknown host
% hostname --alias
hostname: Unknown host
% hostname -i
hostname: Unknown host
% hostname --ip-address
hostname: Unknown host
% hostname -f
hostname: Unknown host
% hostname --fqdn
hostname: Unknown host
% hostname --long
hostname: Unknown host
% hostname -d
hostname: Unknown host
% hostname --domain
hostname: Unknown host
% hostname -y
(none)
% hostname --yp
(none)
% hostname --nis
(none)
[don@steinbeck ~]$


Expected results:
I expected not to get error messages.


Additional info:

Comment 1 Zdenek Prikryl 2008-07-08 09:17:38 UTC
Hello,
the reason why hostname ends with "hostname: Unknown host" is that probably you
have something wrong configured. In my opinion this is not a bug in hostname.
Furthermore, I didn't manage to reproduce this bug on any PC that I have
(hostname works fine with all options on all PC).

You can try to run hostname with -v option. It enables verbose mode and you can
find where a bug is.