#!/bin/sh
#

#
# As documented in bug 6265161, the apache packages for TS8 
# and S8 have exactly the same VERSION string. This makes it
# possible to install the TS8 apache patches on Solaris 8 
# unless the patch prevents that. This prepatch script checks
# the installed Trusted Solaris package SUNWtsr
# and aborts the patch install if an attempt is made to install 
# this patch on Solaris 8 system (which wouldn't have SUNWtsr).
#

if [ "$PKG_INSTALL_ROOT" = "$ROOTDIR" ]; then
        PKG_INSTALL_ROOT=""
fi

NOVERS_MSG="PaTcH_MsG 8 Trusted Solaris is not installed on this system."

export NOVERS_MSG

pkginfo -R ${PKG_INSTALL_ROOT:-"$ROOTDIR"} -v 2.5.0,REV=2003.04.03.21.27 -q SUNWtsr
status=$?
if [ $status -ne 0 ] ; then
	echo "\n\n"
	echo $NOVERS_MSG
	echo "Attempt to install Trusted Solaris patch ${PatchNum} on this system aborted."
	echo "\n\n"
	exit 1
fi;

exit 0
