#!/usr/bin/ksh
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

USE_INTERNAL_DEP=TRUE

typeset opt

while getopts 'R:G:Z' opt
do
        case "$opt" in
                R)      RESOURCE=$OPTARG;;
                G)      RESOURCEGROUP=$OPTARG;;
                Z)      USE_INTERNAL_DEP=FALSE;;
                *)      logger -p daemon.err \
                        "ERROR: `basename $0` Option $OPTARG unknown"
                        exit 1;;
        esac
done

. `dirname $0`/../etc/config
. `dirname $0`/functions

validate_options

debug_message "Method: `basename $0` - Begin"
$SET_DEBUG

stop_sag

if [ "$rc_stop_command" -eq 0 ]
then
        log_message notice "stop_sag succeeded : rc<$rc_stop_command>"
        debug_message "Method: `basename $0` - End (Exit 0)"
        exit 0
else
        log_message err "stop_sag failed : rc<$rc_stop_command>"
fi

debug_message "Method: `basename $0` - End (Exit 0)"
exit 0
