#
#	ident "@(#)preremove	1.0	
#
#

NAME='lsen'
CONFBIN=/etc/conf/bin

FULLNAME='LynnSoft SmartEnabler Driver Package'

TMP=/tmp/$NAME.err
ERROR=" An error was encountered removing the $FULLNAME.
	The file $TMP contains errors reported by the system."

clear

echo "Removing $FULLNAME..."

${CONFBIN}/idcheck -p $NAME 2 >/dev/null
if [ $? = 0 ]
then
	exit 0
else
	:	
fi

echo

${CONFBIN}/idinstall -e -d $NAME 2>$TMP
if [ $? != 0 ]
then
	message $ERROR
	exit 1
fi

echo "Removing commands and associated files"

for i in $FILES
do
	rm -f $i 2> /dev/null
done

# ${CONFBIN}/idbuild -B  >$TMP
${CONFBIN}/idbuild >$TMP
if [ $? != 0 ]
then
	message $ERROR
	exit 1
fi

#
# All done, remove the error file and leave
#
rm -f $TMP
exit 10
