* uname -n?
@ 2000-06-02 4:00 Legend
2000-06-03 4:00 ` Stefan Moeding
[not found] ` <3943E251.179F5FFC@dassic.com>
0 siblings, 2 replies; 3+ messages in thread
From: Legend @ 2000-06-02 4:00 UTC (permalink / raw)
Hello all,
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.
regards,
benny
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: uname -n?
2000-06-02 4:00 uname -n? Legend
@ 2000-06-03 4:00 ` Stefan Moeding
[not found] ` <3943E251.179F5FFC@dassic.com>
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Moeding @ 2000-06-03 4:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <3943E251.179F5FFC@dassic.com>]
* Re: uname -n?
[not found] ` <3943E251.179F5FFC@dassic.com>
@ 2000-07-11 4:00 ` Tony Verhulst
0 siblings, 0 replies; 3+ messages in thread
From: Tony Verhulst @ 2000-07-11 4:00 UTC (permalink / raw)
> 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.
Tru64 Unix uname -n is documented as:
-n Displays the name of the node (this *may* be a name that the system
is
known by to a communications network).
Similar wording is used in other uname man pages that I've seen on the
web for AIX, SOLARIS, and other vendors. In fact, the Solaris man page
says "....the nodename *is* the name by which the system is known to a
communications network..." - see
http://www.cs.rit.edu/~hpb/Man/_Man_Solaris_2.6_html/html1/uname.1.html.
In any case, Tru64 Unix uname -n displays the name as set in
/etc/rc.config HOSTNAME. This file is typically generated as system
installation time and HOSTNAME is chosen by the person performing the
installation.
Tony V.
Kernel Group
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-07-11 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-02 4:00 uname -n? Legend
2000-06-03 4:00 ` Stefan Moeding
[not found] ` <3943E251.179F5FFC@dassic.com>
2000-07-11 4:00 ` Tony Verhulst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox