home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16514 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.0 KB

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