#!/bin/sh
# @(#)preremove 1.1 02/02/28 SMI
# Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# Preremove script to verify that no other packages
# still depend on this package.  To do this, check to
# see if any packages with catagory=SUNDOCS are installed.

if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
	pkginfo -q -c SUNDOCS
	if [ $? -eq 0 ]; then
		echo "Other packages that depend on this package are still installed."
		exit 3
	else
		exit 0
	fi
else
	pkginfo -R ${PKG_INSTALL_ROOT} -q -c SUNDOCS
	if [ $? -eq 0 ]; then
		echo "Other packages that depend on this package are still installed."
		exit 3
	else
		exit 0
	fi
fi
