Files
dreamlayers.netbsd-mopd/otherOS/mdtype
Mats O Jansson b14a737a42 Commit of original mopd-2.5.3 source, downloaded from:
ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3.tar.gz
SHA256 = 6876cf56a763fea8db1f7d76723689bcf00b76edd4124052155f74f64e2b4ed3
2020-10-31 23:02:29 -04:00

52 lines
891 B
Bash
Executable File

#!/bin/sh
#
# @(#) $Id: mdtype,v 1.3 1996/08/06 12:16:45 moj Exp $
#
# Determine machine type.
#
machine="UNKNOWN"
if [ -f /usr/bin/uname ]; then
os=`/usr/bin/uname`
if [ $os = "AIX" ]; then
if [ "`/usr/bin/uname -v`" = "3" ]; then
machine="rs6000"
fi
if [ "`/usr/bin/uname -v`" = "4" ]; then
hw="`/usr/sbin/lsattr -l proc0 -E -a type | /usr/bin/cut -d\ -f2`"
if [ $hw = "PowerPC_601" ]; then
machine="rs6000"
fi
if [ $hw = "POWER" ]; then
machine="rs6000"
fi
if [ $hw = "POWER2" ]; then
machine="rs6000"
fi
fi
fi
if [ $os = "SunOS" ]; then
machine="`/usr/bin/uname -m |/usr/bin/cut -c1-4 `"
fi
if [ $os = "NetBSD" ]; then
machine="`/usr/bin/uname -m`"
fi
if [ $machine = "sparc" ]; then
machine="sun4"
fi
fi
echo $machine
if [ $machine = "UNKNOWN" ]; then
exit 1
else
exit 0
fi