Strangeness with uname -s

Strangeness with uname -s

Post by Chris Halverso » Sat, 15 Mar 1997 04:00:00



While attempting to get the Netscape Calendar server up and running
for a client, I ran into some trouble with the shell scripts that are
installed. They repeatedly call 'uname -s' to get the OS type. On all
of my machines this returns:


SunOS

However, on their machine, it returns:


sparky

sparky

Note that it returns the system name. This, of course, wreaks havoc on
the shell scripts. I've "fooled" them for now, but I'd like to fix
this. How does one fix what 'uname -s' returns. I can only find
references on how to get the values.

Thanks in advance!

Chris

--
Chris D. Halverson                         Complete Internet Solutions
PGP mail accepted, finger for public key   http://www.CompleteIS.com/~cdh/

 
 
 

Strangeness with uname -s

Post by Thomas Ander » Sat, 22 Mar 1997 04:00:00




> sparky
[...]
> Note that it returns the system name. This, of course, wreaks havoc on
> the shell scripts. I've "fooled" them for now, but I'd like to fix
> this. How does one fix what 'uname -s' returns. I can only find
> references on how to get the values.

Standard answer is: Tell us what 'which uname' returns. If it's
not /bin/uname or /usr/bin/uname correct your path. If it is
one of these, someone was very stupid and probably replaced the binary.
Lots of tools rely on the output of uname, changing it brings
you into deep trouble.

Regards,
Thomas

--

Hahn-Meitner-Institute Berlin, Germany