From owner-freebsd-standards@FreeBSD.ORG Tue Sep 22 21:40:03 2009 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35B3C1065679 for ; Tue, 22 Sep 2009 21:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 25BBA8FC18 for ; Tue, 22 Sep 2009 21:40:03 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8MLe2cq067974 for ; Tue, 22 Sep 2009 21:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8MLe2N0067973; Tue, 22 Sep 2009 21:40:02 GMT (envelope-from gnats) Date: Tue, 22 Sep 2009 21:40:02 GMT Message-Id: <200909222140.n8MLe2N0067973@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Andy Kosela Cc: Subject: Re: standards/137173: `uname -n` incorrect behavior X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andy Kosela List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 21:40:03 -0000 The following reply was made to PR standards/137173; it has been noted by GNATS. From: Andy Kosela To: olli@lurza.secnetix.de, jilles@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG, bug-followup@FreeBSD.ORG Cc: Subject: Re: standards/137173: `uname -n` incorrect behavior Date: Tue, 22 Sep 2009 23:08:26 +0200 Oliver Fromme wrote: > Just for the record: > The claim that Solaris doesn't print the FQDN is incorrect. > Solaris prints whatever the admin has configured in /etc/nodename. > If the admin has configured the FQDN, "uname -n" will print the FQDN. > AFAIK it is the same for HP-UX. > > So, FreeBSD really behaves the same as Solaris and HP-UX: > If you configure the hostname to be the FQDN, "uname -n" will print it, > just like the "hostname" command. FYI # uname -a HP-UX vital15 B.11.23 U ia64 1058748580 unlimited-user license # uname -n vital15 # hostname vital15.testdrive.hp.com so NODENAME != HOSTNAME The startup variable NODENAME is the UUCP name which is returned by uname -n, while the HOSTNAME variable sets the networking (ARPA, NFS, etc) name, which can be 64 chars long (see /usr/include/sys/param.h for MAXHOSTNAMELEN). HOSTNAME can be much longer than 8 characters BUT only if you define an 8-character or less NODENAME in the /etc/rc.config.d/netconf file. --Andy