Date: Tue, 22 Sep 2009 23:08:26 +0200 From: Andy Kosela <akosela@andykosela.com> To: olli@lurza.secnetix.de, jilles@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG, bug-followup@FreeBSD.ORG Subject: Re: standards/137173: `uname -n` incorrect behavior Message-ID: <4ab93cca.vZr1%2BIV6M72iTd1N%akosela@andykosela.com> In-Reply-To: <200909221705.n8MH5NEh064549@lurza.secnetix.de> References: <200909221705.n8MH5NEh064549@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme <olli@lurza.secnetix.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ab93cca.vZr1%2BIV6M72iTd1N%akosela>