aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg_install-devel
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-07-02 00:31:18 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-07-02 00:31:18 +0000
commit580eeeff30d884bb343a8a69d8bab5ce194707b7 (patch)
tree9644b25f5ec02f1422ad18bc7f9ac3166b40fa7a /ports-mgmt/pkg_install-devel
parentf2d50f5392deb62f228b2f599c7d5e628007cbb2 (diff)
downloadports-580eeeff30d884bb343a8a69d8bab5ce194707b7.tar.gz
ports-580eeeff30d884bb343a8a69d8bab5ce194707b7.zip
Notes
Diffstat (limited to 'ports-mgmt/pkg_install-devel')
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-req13
1 files changed, 9 insertions, 4 deletions
diff --git a/ports-mgmt/pkg_install-devel/pkg-req b/ports-mgmt/pkg_install-devel/pkg-req
index c7d1b7507722..b57ba6f2ca2d 100644
--- a/ports-mgmt/pkg_install-devel/pkg-req
+++ b/ports-mgmt/pkg_install-devel/pkg-req
@@ -3,13 +3,18 @@
# $FreeBSD$
#
-PKG_INFO=/usr/sbin/pkg_info
+if [ -z "$OSVERSION" ]; then
+ if [ -x /sbin/sysctl ]; then
+ OSVERSION=`/sbin/sysctl -n kern.osreldate`
+ else
+ OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
+ fi
+fi
case $2 in
INSTALL)
- PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null`
- if [ -n "${PKG_INSTALL_VER}" -a "${PKG_INSTALL_VER}" -ge %%PORTVERSION%% ]; then
- echo "Your base pkg_install tools are already up-to-date"
+ if [ "$OSVERSION" -ge 492000 -a "$OSVERSION" -lt 500000 -o "$OSVERSION" -ge 502120 ]; then
+ echo "$1: Your base pkg_install tools are already up-to-date."
exit 1
fi
;;