standards/137173: `uname -n` incorrect behavior

View: New views
2 Messages — Rating Filter:   Alert me  

standards/137173: `uname -n` incorrect behavior

by Andy Kosela-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>Number:         137173
>Category:       standards
>Synopsis:       `uname -n` incorrect behavior
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-standards
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 27 13:30:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Andy Kosela
>Release:        
>Organization:
>Environment:
FreeBSD plotinus.lan 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Sat Jun  6 15:21:16 CEST 2009     akosela@...:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Currently `uname -n` prints the name of the system (FQDN) to standard output.  I believe this is incorrect behavior according to IEEE Std 1003.1.

-n
    Write the name of this node within an implementation-defined communications network.

On the other hand though HP-UX, AIX, Solaris, Linux seems to conform to IEEE Std 1003.1 in this aspect and print only the hostname (without the domain name). This feature of uname(1) is important for some of us who rely on `uname -n` in PS1.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-standards@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe@..."

Parent Message unknown Re: standards/137173: `uname -n` incorrect behavior

by Jilles Tjoelker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR standards/137173; it has been noted by GNATS.

From: Jilles Tjoelker <jilles@...>
To: bug-followup@..., akosela@...
Cc:  
Subject: Re: standards/137173: `uname -n` incorrect behavior
Date: Mon, 27 Jul 2009 23:31:56 +0200

 I understand that `uname -n`'s behaviour may be inconvenient to you, but
 I do not see why it is not compliant. An FQDN seems a valid "name of
 this node within an implementation-defined communications network".
 
 You can use shell-specific prompt expansions that generate the hostname
 without domain, or myhost=`uname -n`; myhost=${myhost%%.*}.
 
 --
 Jilles Tjoelker
_______________________________________________
freebsd-standards@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe@..."