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

OS=`uname -s`
if [ ! -n "${OS}" ]; then
    echo "Unable to determine operating system."
    exit 1
fi

if [ "${OS}" = "SunOS" ]; then
    IMPLX=solaris_implx
elif [ "${OS}" = "Linux" ]; then
    IMPLX=linux_implx
elif [ "${OS}" = "HP-UX" ]; then
    IMPLX=hpux_implx
elif [ "${OS}" = "AIX" ]; then
    IMPLX=aix_implx

else
    echo "Not supported on detected OS \"${OS}\"."
    exit 1
fi

SMREG=${BASEDIR}/usr/sbin/smreg
if [ -s ${SMREG} ]; then
    ${SMREG} remove -l -s ALL com_sun_management_${IMPLX}.jar
fi

exit 0
