Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uname returns "-t"

Status
Not open for further replies.

simpson

MIS
Oct 23, 2001
58
CA
When I execute the command uname on my system instead of it returning HP-UX I get -t as a responce.

Any idea why???
 
Don't know, sorry.
But for further testing:

1) What is the output of these commands:
uname -a
uname | xd -cx

2) Is it the same for all users, even when you try as root?
 
Most likely someone did a "setname -t" on this server. You can do a setname to change it back to the original name.
 
TheKidd,

there is no setname command on my HP-UX 11.23/IA64.
which version of HP-UX are you talking about?
 
Oops. I was referring to 11.11...I think. I'm pretty sure I accidently ran "setname -a" when I really wanted to run "uname -a
 
Perhaps it was 11.00. I'm running 11.11 and I don't see a setname command neither.
 
TheKidd,

thanks for clarifying;
and I think I made the same mistake with hostname command a few times...
But I never happend to change the name of the operating system.
 
Looks like I misread your inital question, I didn't realize that it was the OS name that had changed. I'm clueless on this one. Sorry...
 
Boy I really screwed this one up. Must be Monday all over again. It was "hostname" not "setname" that I was referring too.
 
Thanks for the attempts. Here is the output of the commands. If anyone has any ideas, please let me know..
======================================
ka15hp01-/ >hostname
ka15hp01
ka15hp01-/ >uname
-t
ka15hp01-/ >uname -a
-t ka15hp01 B.11.11 U 9000/785 2006729604 unlimited-user license
ka15hp01-/ >uname | xd -cx
0000000 2d74 0a00
- t \n
0000003
ka15hp01-/ >
===========================================
Thanks
 
Hello,

it seems to be a bug in some older versions of HP-UX;
I looked in the scripts that are executed at startup, and found this in /sbin/init.d/hostname on HP-UX 11.23:
# JAGae29563 ( uname(1) is displaying -t as the OS name )
# Adding a condition to check OPERATING_SYSTEM, before sending it to
# setuname. previously setuname was called as "setuname -s
# $OPERATING_SYSTEM -t". If OPERATING_SYSTEM is not set, then -t
# is taken as argument to -s and OPERATING_SYSTEM is set to -t.
# The manpage of setuname clearly says, -s needs an argument.

if [ -z "$OPERATING_SYSTEM" ]; then
echo "WARNING: OPERATING_SYSTEM is not set."
echo " using default value of HP-UX"
OPERATING_SYSTEM=HP-UX
fi
setuname -t -s $OPERATING_SYSTEM
So it seems HP found a workaround in the meantime, and I suppose there should be a patch for your version, too.

regards
 
Thank you very much for this information. I will dig around. Thansk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top