# Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
# @(#)postremove	1.1 01/10/29 Sun Microsystems

#
# This postremove script returns the system to the way it was
# before the patch was installed. So in /usr/platform/ ,
# the original pre-patch configuration was for
# SUNW,UltraSPARCengine_CP-20 to be a symbolic link to sun4u.
# Post-patch SUNW,UltraSPARCengine_CP-20 is now a directory
# with an empty lib directory in it. Remove the empty directories
# and re-create the symbolic link.
#

iroot=${PKG_INSTALL_ROOT:-$BASEDIR}

cd ${iroot}/usr/platform
if [ -d SUNW,UltraSPARCengine_CP-20 ] ; then
	rm -rf SUNW,UltraSPARCengine_CP-20
	ln -s sun4u SUNW,UltraSPARCengine_CP-20
fi

exit 0
