home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / apollo / 4220 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.8 KB  |  56 lines

  1. Newsgroups: comp.sys.apollo
  2. Path: sparky!uunet!mcsun!sun4nl!relay.philips.nl!cazander
  3. From: cazander%serigate@phcoms.seri.philips.nl (Koos Cazander)
  4. Subject: Re: Apollo program to give System Type?
  5. Message-ID: <1993Jan11.105915.2426@phcomgw.seri.philips.nl>
  6. Originator: news@phcoms.seri.philips.nl
  7. Sender: news@phcomgw.seri.philips.nl
  8. Organization: SERI-CEN Network Services, Philips C&P, Eindhoven, The Netherlands
  9. X-Newsreader: TIN [version 1.1 PL8]
  10. References: <BRI.93Jan8113408@pegasus.mit.edu>
  11. Distribution: comp
  12. Date: Mon, 11 Jan 1993 10:59:15 GMT
  13. Lines: 41
  14.  
  15. Brian D. Carlstrom (bri@athena.mit.edu) wrote:
  16. : is there a program i can run on the apollo that will return
  17. : a short answer system type such as just 'apollo' or even
  18. : 'sau7' or 'sau8'? sorta like machtype or hosttype or 
  19. : arch on the sun.
  20.  
  21. : -bri
  22.  
  23. We use something like the script below, to detemine the machine type:
  24.  
  25. --
  26. #!/bin/sh
  27. # Determine the machine type and architecture.
  28.  
  29. if [ -d '`node_data' ];    then            # Apollo
  30.     echo apollo.${ISP=m68k}
  31.     exit 0
  32. fi
  33. if [ -f /bin/arch ];    then            # Sun
  34.     echo `/bin/arch | sed -e s/Sun/sun/`
  35.     exit 0
  36. fi
  37. if [ -f /bin/uname ];    then            # Others
  38.     sysname=`/bin/uname -m`
  39.     case $sysname in
  40.         9000/[678]*)        echo hp.pa;;
  41.         9000/[34]*)        echo hp.m68k;;
  42.         *)            echo $sysname;;
  43.     esac
  44.     exit 0
  45. fi
  46. echo Unknown
  47. exit 1
  48. --
  49. ----------------------------------------------------------------------
  50. -- If you want to send EMAIL, include a subject line in the header: --
  51. --     'Subject: <cazander:pasichva>'   (without the quotes :-)     --
  52. --        and send it to 'serigate@phcoms.seri.philips.nl'.         --
  53. ----------------------------------------------------------------------
  54. -- J. Cazander, Philips Electronic Design & Tools, The Netherlands. --
  55. ----------------------------------------------------------------------
  56.