Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!cs.utexas.edu!rutgers!ucsd!ucsdhub!hp-sdd!apollo!oj From: oj@apollo.HP.COM (Ellis Oliver Jones) Newsgroups: comp.sys.apollo Subject: Re: How can a script determine machine type & OS? Message-ID: <47942aec.20b6d@apollo.HP.COM> Date: 22 Dec 89 14:21:00 GMT References: <11360003@hp-lsd.COS.HP.COM> <1361@merlin.bhpmrl.oz> Sender: root@apollo.HP.COM Reply-To: oj@apollo.hp.com Organization: Apollo Computer, Chelmsford, MA Lines: 18 Nobody has mentioned the environment variables set up automatically in Domain/OS processes: SYSTYPE=bsd4.3 ISP=m68k TERM=apollo_1280_bw NODETYPE=DN4000 NODEID=14E4F SYSTYPE, ISP, and NODETYPE can tell you a lot about what kind of machine you're running on. Avoid depending on TERM, because a lot of the newer display devices just use the value "apollo." Beware if you hardcode dependencies on NODETYPE -- sometimes beta and early bird versions of new hardware have strange nodetype values like "DNEXYZ" (which later became "DN2500"). /oj (speaking for myself, not necessarily for HP Apollo Systems Division)