#sccs	"@(#)crypt:Remove	1.10"

#
#	FILE:        Remove                 DATE:  February 12, 1986
#	CREATED BY:  Mark Emmerich
#
#	Remove script for the "crypt" package software and editors.
#
# --------------------------------------------------------------------

ENHED=`echo "\0166\0151"`
EDLINK1=`echo "\0145\0144\0151\0164"`
EDLINK2=`echo "\0145\0170"`
EDLINK3=`echo "\0166\0151\0145\0167"`

REBOOT="\
Before these changes can take effect, you will have to reboot your \
system.  Close all windows but the Office, then use the Shutdown \
command.\n\n\
  Please touch ENTER to continue."

echo
echo
echo "        Removing the Crypt replacement software."
echo

##  REMOVE OR REPLACE FOUNDATION FILES

rm -f  /usr/bin/crypt
rm -f  /usr/lib/makekey
mv  /bin/ed /tmp/
mv  /bin/ed-old /bin/ed
mv  /lib/shlib /tmp/
mv  /lib/shlib-old /lib/shlib

##  IF DEVELOPMENT SET WAS INSTALLED, THEN REPLACE THE OLD LIBRARIES

if [ -s /lib/libc.a-old ]
then
	for FILE in libc.a libp/libc.a
	do
		mv  /lib/$FILE /tmp/
		mv  /lib/${FILE}-old /lib/$FILE
	done
fi

##	IF $ENHED IS INSTALLED, REPLACE IT WITH THE OLD.

if [ -s /usr/bin/${ENHED}-old ]
then
	mv  /usr/bin/$ENHED /tmp/
	mv  /usr/bin/${ENHED}-old /usr/bin/$ENHED
	ln  /usr/bin/$ENHED /usr/bin/$EDLINK1
	ln  /usr/bin/$ENHED /usr/bin/$EDLINK2
	ln  /usr/bin/$ENHED /usr/bin/$EDLINK3
fi

message -i "$REBOOT"

echo
echo "        Crypt replacement software is now removed."
echo

