what kind of machine am I

Eric Murray ericm at ibmpa.awdpa.ibm.com
Thu May 16 09:05:24 AEST 1991


In article <4035 at island.COM> daniel at island.COM (Daniel Smith "innovation, not litigation...") writes:
>
>#! /bin/sh
>#
>#	whicharch - what machine am I on?
>#	daniel at island.com (Please send me any extensions to this)
>#
[...]

Here's how to tell the various IBM UNIX-like systems apart:

#	Determine the system type.  Set ${sys} to one of the
#	following depending on which operating system is running.
#
#	rt_bsd:	4.3 BSD on RT
#	aix_22:	AIX 2.* on RT
#	aix_11: AIX 1.1 or AIX 1.2 on PS/2
#	aix_31: AIX 3.1 on RISC 6000
#
#

if [ -f /unix ]
then
	if [ -d /vrm ]
	then
		sys=aix_22
	else
		if [ -d /etc/security ]
		then
			sys=aix_31
		else
			sys=aix_11
		fi
	fi
else
	if [ -f /vmunix ]
	then
		sys=rt_bsd
	else
		sys=unknown
	fi
fi

 eric murray         ericm at angst.awdpa.ibm.com      ericm at ibminet.awdpa.ibm.com
 the lawyers make me say: this posting doesn't represent official ibm policy



More information about the Comp.unix.admin mailing list