#
# Removal script for the OWconfig class
# Remove any extries that belong to this package
# Delete the file if it's empty
# Since the OWconfig entries should only be removed once, and
# since it is assumed that the native architecture's packages are
# installed before alternate architecture's, the binary is only
# executed for a native install.
#
if [ `/bin/uname -p` = "$ARCH" ] ; then
	echo "removing KCMS entries from OWconfig"
        if [ -f $BASEDIR/openwin/server/etc/OWconfig ] ||
           [ -f $BASEDIR/../etc/openwin/server/etc/OWconfig ] ; then
                if [ -f $BASEDIR/openwin/share/etc/OWconfig_entries ] &&
                   [ -f $BASEDIR/openwin/lib/libX11.so ] &&
                   [ -f $BASEDIR/openwin/lib/libXext.so ] &&
                   [ -f $BASEDIR/openwin/lib/libowconfig.so ] ; then
                        $BASEDIR/openwin/share/etc/OWconfig_entries -r $BASEDIR
                fi
        fi
        if [ -f $BASEDIR/openwin/share/etc/OWconfig_entries ] ; then
                rm -rf $BASEDIR/openwin/share/etc/OWconfig_entries
        fi
fi
exit 0
