blob: ebe2b365a37c75c46fc833523ce0fe12a42ee9e0 (
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
|
#!/bin/sh
#
# @(#) $OpenBSD: ostype,v 1.3 1999/03/27 14:31:23 maja Exp $
#
# Determine os type.
#
os="UNKNOWN"
if [ -f /usr/bin/uname ]; then
osname=`/usr/bin/uname`
if [ $osname = "AIX" ]; then
os="aix`/usr/bin/uname -v`"
fi
if [ $osname = "SunOS" ]; then
os="sunos`/usr/bin/uname -r | /usr/bin/cut -c1`"
fi
if [ $osname = "NetBSD" ]; then
os="netbsd"
fi
fi
if [ -f /bin/uname ]; then
osname=`/bin/uname`
if [ $osname = "Linux" ]; then
os="linux`/bin/uname -r | /usr/bin/cut -d. -f1`"
fi
fi
echo $os
if [ $os = "UNKNOWN" ]; then
exit 1
else
exit 0
fi
|