blob: 485a1202580c2155c27ffcdd16d35fcfb43e018a (
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
34
35
|
# $NetBSD: INSTALL,v 1.2 2011/02/05 13:21:13 obache Exp $
UNAME="@UNAME@"
case ${STAGE} in
PRE-INSTALL)
OS_VERSION=`${UNAME} -r`
PKG_VERSION="${PKGNAME##*-}"
case `${UNAME} -s` in
AIX)
if ${TEST} -f /usr/bin/oslevel ;then
OS_VERSION=`/usr/bin/oslevel | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
else
OS_VERSION="`${UNAME} -v`.`${UNAME} -r`"
OS_VERSION=`echo "${OS_VERSION}" | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
fi
;;
DragonFly|FreeBSD|Linux)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/-.*$//'`
;;
OSF1)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^V//'`
;;
HPUX)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^B.//'`
;;
esac
if ${TEST} "${OS_VERSION}" != "${PKG_VERSION}" ;then
echo "The Operating System version (${OS_VERSION}) does not match ${PKG_VERSION}"
exit 1
fi
;;
esac
|