blob: a74b48dee4b4c41f29817fae3207edc502de520f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#!/bin/sh
#
# @(#) $OpenBSD: mdtype,v 1.3 1999/03/27 14:31:22 maja 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
if [ -f /bin/uname ]; then
os=`/bin/uname`
if [ $os = "Linux" ]; then
machine="`/bin/uname -m`"
if [ $machine = "i686" ]; then
machine="i386"
fi
if [ $machine = "i586" ]; then
machine="i386"
fi
if [ $machine = "i486" ]; then
machine="i386"
fi
fi
fi
echo $machine
if [ $machine = "UNKNOWN" ]; then
exit 1
else
exit 0
fi
|