#!/usr/bin/ksh
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#########################
# rev 1.0 sds version SAA agent
# comment : As required by SWIFT no monitoring is done for 
# SAA in the cluster ... system admin should remain possible 
# from the SAA admin module
# this is against the nature of Sun Cluster but as required by SWIFT
#########################

typeset opt

while getopts 'R:G:' opt
do
        case "$opt" in
                R)      RESOURCE=$OPTARG;;
                G)      RESOURCEGROUP=$OPTARG;;
                *)      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

validate

if [ "${rc_validate}" -ne 0 ]
then
        debug_message "Method: `basename $0` - End (Exit 100)"
        exit 100
fi

check_dce
if [ "${rc_check_command}" -ne 0 ]
then
	debug_message "Method: `basename $0` - End (Exit 100)"
	exit 100
fi

check_SAA

if [ "${rc_check_command}" -ne 0 ]
then
	debug_message "Method: `basename $0` - End (Exit 100)"
	exit 100
fi

set_status OK

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