# Copyright (c) 1996-2002 Sun Microsystems, Inc.  All Rights Reserved. Sun
# considers its source code as an unpublished, proprietary trade secret, and
# it is available only under strict license provisions.  This copyright
# notice is placed here only to protect Sun in the event the source is
# deemed a published work.  Dissassembly, decompilation, or other means of
# reducing the object code to human readable form is prohibited by the
# license agreement under which this code is provided to the user or company
# in possession of this copy.
#
# RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the Government
# is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the
# Rights in Technical Data and Computer Software clause at DFARS 52.227-7013
# and in similar clauses in the FAR and NASA FAR Supplement.
#

WBEMINIT=${ROOTDIR}/etc/init.d/init.wbem

PKGINFO="/usr/bin/pkginfo"

VERSION=`$PKGINFO -l SUNWppro 2>/dev/null | grep VERSION | sed 's/VERSION://'`
if [ "$VERSION" != "" ]
then
	MAJORVERSION=`echo $VERSION | sed 's/\..*$//'`
	MINORVERSION=`echo $VERSION | sed 's/^.*\.//'`
	if [ $MAJORVERSION -lt 2 ]
	then
		echo "PatchPro Version 2.1 or greater is required.  You are"
		echo "currently running version $VERSION.  Please upgrade"
		echo "to at least 2.1 before using Patch Manager."
	else
		if [ $MINORVERSION -lt 1 ]
		then
			echo "PatchPro Version 2.1 or greater is required.  You are"
			echo "currently running version $VERSION.  Please upgrade"
			echo "to at least 2.1 before using Patch Manager."
		fi
	fi
else
	echo "In order to enable the full functionality of Patch Manager,"
	echo "PatchPro Version 2.1 or greater is required.  You are"
	echo "encouraged to install PatchPro before using Patch Manager."
fi

# Stop CIMOM
if [ $ROOTDIR = "/" ]; then
     ${WBEMINIT} stop
fi
