#! /usr/bin/sh
#
# ident	"@(#)preremove 1.1     04/12/21 SMI"
#
# Copyright (c) 2004 by Sun Microsystems, Inc.
# All rights reserved.
#
#

# Set the install root directory for lookup; use PKG_INSTALL_ROOT if set:
iroot=${PKG_INSTALL_ROOT:-$BASEDIR}

PATH="/usr/bin:/usr/sbin"
export PATH

ROOT_LICENSE="/var/opt/SUNWcest/conf/licence.accepted.for.root"

if [ -f "${ROOT_LICENSE}" ] ; then
	rm -f ${ROOT_LICENSE}
fi

crontab -l | grep "# SUNWcest$" > /dev/null
[ $? != 0 ] && exit 0

crontab -l | sed -e "/.*# SUNWcest$/d" > /tmp/crontab.$$
crontab /tmp/crontab.$$
rm -f /tmp/crontab.$$

exit 0 # successful checkinstall run
