#!/bin/sh
# Copyright 02/23/01 Sun Microsystems, Inc. All Rights Reserved.
# pragma ident  "@(#)preremove	1.2 01/02/23 Sun Microsystems"
#
# SunManagementCenter-Storage preremove script
#
# remove all managed Storedge T3
# then remove the package files
#

BASEDIR=`/usr/bin/pkgparam SUNWessta BASEDIR`
if [ -z "${BASEDIR}" ]; then
    exit 0
fi

# set NLSPATH for I18N
NLSPATH=/var/opt/SUNWsymon/locale/%L/LC_MESSAGES/T300_SETUP.mo
export NLSPATH

# set TEXTDOMAIN
TEXTDOMAIN=T300_SETUP
export TEXTDOMAIN

ESROOT=$BASEDIR/SUNWsymon
export ESROOT

device_platform=`/usr/bin/uname -p`
os_release=`/usr/bin/uname -r | sed 's/^5/2/' | cut -d\. -f1,2`
archos_dir=`echo $device_platform-sun-solaris$os_release`

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ESROOT/base/lib/$archos_dir"
export LD_LIBRARY_PATH

$ESROOT/addons/storage/sbin/t300cfg rm

exit 0
