#! /bin/sh
#
# Copyright (c) 1991, by Sun Microsystems, Inc.
#
#

#
# Give up if /usr not mounted
#
if [ ! -d /usr/bin ]
then			# /usr not mounted
	exit
fi

PATH="/bin:/usr/ucb:/usr/bin:/etc"
export PATH

# echo "debug: BEGINNING OF POSTREMOVE"

#
# Only slip stuff to do
#
if [ $DO_SLIP -eq 1 ]
then
	echo ""
	echo "Restoring system files...."
	echo ""
	if [ -f /etc/gateways.pre-pcnfs ] ;
	then
		echo ""
		echo "	/etc/gateways...."
		echo ""
		mv /etc/gateways.pre-pcnfs /etc/gateways
	fi
	if [ -f /usr/sbin/in.rdisc.pre-pcnfs ] ;
	then 
		echo ""
		echo "	/usr/sbin/in.rdisc...."
		echo ""
		mv /usr/sbin/in.rdisc.pre-pcnfs /usr/sbin/in.rdisc
	fi
#
# I thinkthis is better than copying their old devlinks....
#
	echo ""
	echo "	/etc/devlink.tab...."
	echo ""
	/usr/bin/grep -v '^type=ddi_pseudo;name=sl	\\M0' /etc/devlink.tab > /tmp/pcnfs.tmp
	mv /tmp/pcnfs.tmp /etc/devlink.tab
fi	

#
# And we're all done!
#
echo ""
echo "Package remove complete...."
if [ $DO_SLIP -eq 1 ] ;
then
	echo ""
	echo "NOTE: YOU NEED TO REBOOT YOUR MACHINE."
	echo ""
fi
echo ""

# echo "debug: END OF POSTREMOVE"
