#!/bin/sh
#
# ident "@(#)preremove	1.21	07/09/04 SMI"
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

CONSOLE_HOME=${BASEDIR}/usr/share/webconsole


# Extract console version.  The version is in a file localized for the
# current locale.  If this file does not exist, assume the default
# "C" locale.
#
VERSION_FILE=${CONSOLE_HOME}/version.txt
if [ -f ${VERSION_FILE} ]; then
    VERSION="`cat ${VERSION_FILE}`"
else
    VERSION="???"
fi


# Unregister the console and tags
SMREG=${BASEDIR}/usr/sbin/smreg
if [ -s ${SMREG} ]; then
    ${SMREG} remove -l -s ALL com_sun_management_cc.jar
    ${SMREG} remove -l -s ALL com_sun_management_webcommon.jar
    ${SMREG} remove -l -s ALL com_iplanet_jato_jato.jar
    ${SMREG} remove -l -s ALL com_sun_management_services_api.jar
    ${SMREG} remove -l -s ALL com_sun_management_services_impl.jar
    ${SMREG} remove -l -s ALL com_sun_management_console_impl.jar
    ${SMREG} remove -a com.sun.web.ui_${VERSION}
    ${SMREG} remove -a com.sun.web.console_${VERSION}
fi

exit 0
