#!/bin/sh
##############################################################################
#
#	Usage: 	preremove
#
#	Copyright (C)2004, Sun Microsystems Inc.
#	All rights reserved.
#
#       pragma ident	"$SunId$ SMI"
##############################################################################

#
# control logging method
#

#log="logger -pdaemon.err"
log=echo

#
# we need to run this script as root
#
userid=`id | cut -f2 -d'(' | cut -f1 -d')'`

if [ ! "$userid" = "root" ]
then
	$log "preremove: this program needs to run as root"
	exit 1
fi

sysidconfig -b "${PKG_INSTALL_ROOT}/" -r "/usr/lib/cc-ccr/bin/eraseCCRRepository"
## must be done in 'root' pkg because 'user' pkg can't touch 'system' settings

exit 0
