Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | #-------------------------------------------------- |
---|
4 | select_system () |
---|
5 | #-------------------------------------------------- |
---|
6 | { |
---|
7 | if test ! "${UNAME}" = "" ; then |
---|
8 | echo ${UNAME} |
---|
9 | return 0 |
---|
10 | else |
---|
11 | UNAME=`uname` |
---|
12 | fi |
---|
13 | |
---|
14 | may_use_afs=1 |
---|
15 | |
---|
16 | case ${UNAME} in |
---|
17 | Darwin) |
---|
18 | may_use_afs=0 |
---|
19 | ;; |
---|
20 | esac |
---|
21 | |
---|
22 | if test "${may_use_afs}" = 1; then |
---|
23 | a=`fs sysname 2>/dev/null` |
---|
24 | if test $? = 0 ; then |
---|
25 | echo $a | \ |
---|
26 | sed -e "s#[ ':]##g" \ |
---|
27 | -e "s#'##g" \ |
---|
28 | -e "s#Currentsysnameis##" |
---|
29 | |
---|
30 | return 0 |
---|
31 | fi |
---|
32 | fi |
---|
33 | |
---|
34 | case ${UNAME} in |
---|
35 | LynxOS) |
---|
36 | echo `uname`-`uname -m` |
---|
37 | return 0 |
---|
38 | ;; |
---|
39 | Linux) |
---|
40 | echo `uname`-`uname -m` |
---|
41 | return 0 |
---|
42 | ;; |
---|
43 | Darwin) |
---|
44 | echo `uname` |
---|
45 | return 0 |
---|
46 | ;; |
---|
47 | OSF1) |
---|
48 | if test `uname -r` = "V3.2" ; then |
---|
49 | echo alpha_v3 |
---|
50 | return 0 |
---|
51 | fi |
---|
52 | ;; |
---|
53 | HP-UX) |
---|
54 | if test `uname -m` = "9000/780" ; then |
---|
55 | echo hp9000s780 |
---|
56 | return 0 |
---|
57 | elif test `uname -m` = "9000/735" ; then |
---|
58 | echo hp9000s735 |
---|
59 | return 0 |
---|
60 | fi |
---|
61 | ;; |
---|
62 | esac |
---|
63 | |
---|
64 | echo `uname -m` |
---|
65 | return 0 |
---|
66 | } |
---|
67 | |
---|
68 | #-------------------------------------------------- |
---|
69 | # main () |
---|
70 | #-------------------------------------------------- |
---|
71 | |
---|
72 | select_system |
---|
Note: See
TracBrowser
for help on using the repository browser.