#
# preremove
#
#	PreRemoval script for SunPC. The main purpose of this script is to
#	remove the patches directory created by the SunPC postinstall
#	script.
#
#	For Sunpc 4.2 remove DOS files.
#
#
#       SunPC 4.2 remove
        SUNPCHOME=$BASEDIR/SUNWsunpc
        /usr/bin/rm -rf $SUNPCHOME/defaults/6.22/dos
        /usr/bin/rm -rf $SUNPCHOME/defaults/6.22/command.com
        /usr/bin/rm -f $SUNPCHOME/defaults/C.6.22.sunpc3 
        /usr/bin/rm -rf $SUNPCHOME/dos6/msdos
if [ -d $SUNPCHOME/dos ]
then
	/usr/bin/rm -rf $SUNPCHOME/dos
fi
OSLEVELS="2.1 2.2 2.3"

for k in $OSLEVELS
do
	# Make sure this is a valid driectory
	if [ -d $BASEDIR/SUNWsunpc/patches/$k ]
	then
		cd $BASEDIR/SUNWsunpc/patches/$k
		/bin/rm -rf * 
	fi
done
exit 0
