home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!lhdsy1!shc
- From: shc@lhdsy1.lahabra.chevron.com (S.H. Couturie)
- Newsgroups: comp.sys.sgi
- Subject: Re: what should an arch command return on an indigo?
- Message-ID: <8290@lhdsy1.lahabra.chevron.com>
- Date: 17 Nov 92 00:33:21 GMT
- References: <grl.721642136@groucho> <1992Nov16.200138.24748@cc.ic.ac.uk> <1992Nov16.215158.12838@news.arc.nasa.gov>
- Organization: Chevron, LaHabra, CA
- Lines: 55
-
- In article <1992Nov16.215158.12838@news.arc.nasa.gov> lamaster@pioneer.arc.nasa.gov (Hugh LaMaster) writes:
- >In article <1992Nov16.200138.24748@cc.ic.ac.uk>, vulture@imperial.ac.uk (Thomas Sippel - Dau) writes:
- >
- >I like to use "sgi4d" for 32-bit R3000-based machines. Analogous to "sun3"
- >and "sun4".
- >
- >*There should be a standard for the architecture string, and a standard command
- >to return it!*
- >
-
- **** We have, up until now, standardized on the HOSTTYPE names "tcsh" uses;
- why reinvent the wheel?
-
- >|>
- >|> By the way, write all your scripts to use the ARCH environment variable rather
- >|> than the command, and leave it to those who maintain the cshrc and profile
- >|> files to get the variable from the command. This is necessary so that you
- >|> can pass the -target- architecture to an install script, rather than having
- >|> it use the -current- one.
- >
- **** I set HOSTTYPE in /etc/{cshrc,profile} on SGIs.
-
- >It is silly that there is no standard way to get an architecture string.
- >
- >If ARCH becomes a standard environment variable, we still need a standard
- >for what the string returns. I like names which have two pieces concatenated,
- >so that I can pick it apart again if necessary. "sun" "3" or "4", "sgi" "4d",
- >"dec" "vax" or "mips" or "alpha? or perhaps (shorter=better) axp?" ...
- >
-
- **** There is a (more-or-less) standard command: /bin/uname!
-
- Since IRIX 4.0, uname -s returns IRIX. uname -m returns CPU type, which is
- easy to parse into the appropriate bin if you want to separate R4K from R3K
- binaries. For now, we detect on uname -s, and, if IRIX is returned,
- set the enviromental variable HOSTTYPE to "iris4d". I can see the coming
- need for "iris4d-r4k" or something like that, distinguished from
- "iris4d-r3k". (I know that backward compatibility is a curse, so I
- won't belabor the point, but it's too bad that some of those nice
- R4000 features can't be emulated somehow on the R3000's .....)
-
- But, in general, it seems that uname -a returns all that is needed. It
- would be nice if SGI packaged up a "arch" and "arch -k" like replacement
- for IRIX, and nailed down the necessary distinguishing names for all time.
- But, there is no chance of getting DEC and IBM and HP and ... to all
- agree to do that, so you have to use uname anyway!
-
- Of course, there is also /bin/4d and friends, but that is clumsy and silly.
-
- Steve
- --
- Steve Couturie Voice: (310) 694-9332
- Chevron Information Technology Co. FAX: (310) 694-7709
- P.O. Box 446 Internet: shc@chevron.com
- La Habra, CA 90633-0446 UUCP: ...!uunet!lhdsy1!shc
-