From: Stefan Moeding <s.moeding@ndh.net>
Subject: Re: uname -n?
Date: 2000/06/03 [thread overview]
Message-ID: <87zop3qkxp.fsf@esprit.firekeys.org> (raw)
In-Reply-To: m8YZ4.3168$HD6.63379@iad-read.news.verio.net
Hi!
Legend writes:
> I have a question about what this command: "uname -n" is supposed to return.
> On Solaris, it returns my hostname, but on Tru64, it returns
> host.domain.com. I have a few scripts that run fine on other Unix platforms
> but failed on Tru64. Could someone explain to me why it is like this? Is it
> something I did wrong while setting up the system? I am running Tru64 5.0.
> I want to know if this is when Compaq decided to change "uname -n" to return
> the entire hostname and domain name? Which verision begins this unique
> behavior so that I can adjust my script to check on the version accordingly.
"uname -n" returns whatever name was set during system startup with the
hostname command. After running the BIND setup you will find that the
hostname definition in /etc/rc.conf has been changed to contain the FQDN.
This is nothing new. Ultrix did it this way and IIRC it has been this
way since OSF/1 V1.2.
You could use "uname -n | cut -d. -f1" for a portable script.
--
Stefan
next prev parent reply other threads:[~2000-06-03 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-02 4:00 uname -n? Legend
2000-06-03 4:00 ` Stefan Moeding [this message]
[not found] ` <3943E251.179F5FFC@dassic.com>
2000-07-11 4:00 ` Tony Verhulst
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox