#!/bin/ksh
#
# $Revision: 1.1 $
# $Date: 2006/11/13 03:18:07 $
#
LANG=C
export LANG


if [ "$PKG_INSTALL_ROOT" = "/" ]; then
	PKG_INSTALL_ROOT=""
fi

#echo "UPGRADE_INSTALL=$UPGRADE_INSTALL"

# stop console agent and dr, also remove user ssmon,ssadmin,ssconfig
if [ "$UPGRADE_INSTALL" = "true" ]; then
  # stop agent
  if [ -f /etc/init.d/ssagent ]; then
    /etc/init.d/ssagent stop kindly || exit 1
  fi
  
  # stop console
  cd ${PKG_INSTALL_ROOT}/opt/SUNWsscs/sscsconsole
  ./sscs stop
  
  # stop dr
  ssdgrptpop stop
  ssdgrptui stop
  ssdgrptd stop
fi

exit 0
