#!/bin/sh
#
# ident	"@(#)postremove	1.2	95/12/07 SMI"
#
# Copyright (c) 1995 by Sun Microsystems, Inc. All rights reserved.
#
# Post-remove script to remove files copied by postinstall.
#

# Check for valid run environment
if [ ! -d /usr/bin ] ; then
	exit 0
fi
PATH="/usr/sbin:/usr/bin:/bin"
export PATH

SOLARNETDIR=/opt/SUNWpcnet
CLIENTBIN_20=${SOLARNETDIR}/2.0/pc/pro/bin
CLIENTSNC_20=${SOLARNETDIR}/2.0/site/pcnfspro

SNCFILES="\
boot.snc
login.snc
logout.snc"

COPIEDFILES="\
cladmin.exe \
pcadmin.hlp \
user.hlp \
client.hlp \
wpasswd.hlp \
cpalett1.dll \
cpbitmp1.dll \
usradmin.exe \
clntdlg.ini \
wpasswd.exe"

########################################################
# If the SNC files exist, then a real 2.0 client might
# have been installed and the client files should not
# be removed.
########################################################
for FILE in ${SNCFILES}
do
        if [ -f ${CLIENTSNC_20}/${FILE} ] ; then
		exit 0
        fi
done

#######################################
# Remove files copied by postinstall.
#######################################
for FILE in ${COPIEDFILES}
do
        if [ -f ${CLIENTBIN_20}/${FILE} ] ; then
                rm ${CLIENTBIN_20}/${FILE}
        fi
done

exit 0
