>I'm intersted in confirming the correct results for uname(1), particular
>the POSIX.2 standard and on AT&T, NCR, SVR4 boxes.
>I've seen a couple SVR4 boxes on our network at work, and these ATT/NCR
>boxes came back with the machine name as if uname -s really was uname -n.
>Question : what should shell script writers expect on ATT/NCR
>boxes when they use uname -s. And shouldn't it be "UNIX_SVR4" even though
>sysadm's can routinely run setuname to whatever they want?
old SVR3 command. We sell products with UnixWare, used to sell products
with SVR3.2, and our customer's got used to the "uname -S node" command
of the older UNIX and insist on using it instead of "setuname -n node".
You see, it was thought that for UUCP to work correctly, you needed to
set the "system" name to that used in the other box's Systems file. So
"uname -S" did exactly that, set both the node and the system name to
the same value, and scripts got written to either value. What they
didn't realize is that the originators of UNIX where operating-system
centric, and so when they say 'system', they mean 'operating system',
regardless of what the UUCP system considers a "system".
Even now, one of our department servers running UnixWare (an SVR4.2)
displays the following to a "uname -a":
machinename machinename 4.2 1 i386 386/AT
The people installing your NCR-UNIX boxes should have used the
"setuname -n" command to set the nodename. The "setuname -s" command
can be used to correctly set the system value back to "UNIX_SV" or
"UNIX_SVR4".
It checks for both the system and the node fields, and if they are theQuote:>How dows the gnu software figure out which machine they are on in this
>exact same scenario?
same, it ignores those fields and pokes around UNIX'isms unique to
System-V or unique to BSD, and then pokes further to test for files and
directory structures that changed between releases.
Note this can fail, as in the SVR2.4 system I have at home (one of the
last 16-bit UNIXes) that added some SVR3-type things (like shadow
passwords and such) and Berkeley utilities and libraries. If I had
software that look for file differences between versions, it might
mistake that system for a SVR3 system, and fail to build software (the
compiler is *VERY* SVR2 centric).
--
"It was our last, best hope for peace -- it failed. | Scott G. Hall
Now it's our last best hope." (Babylon-5 opener) | Lucent Technologies
----------------------------------------------------------| Bell Labs - BCS