summaryrefslogtreecommitdiff
path: root/usr.sbin/mopd/otherOS/ostype
blob: c1359bed291c6761b067d325c79c249d3b1c0ab7 (plain)
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
#!/bin/sh
#
# @(#) $OpenBSD: ostype,v 1.2 1996/09/21 19:12:48 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

echo $os

if [ $os = "UNKNOWN" ]; then
    exit 1
else
    exit 0
fi