#!/usr/bin/ksh
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This method is called by the optional probe script of the smf method 
#
# Method for the PostgresSql agents smf manifest it is called from the control script
# only if it is an smf probe and the project in the smf service is not :default
# This assures, that most of the probe is running under the correct project.
#
# It is started with 1 parameter
#
# $1 ist the SMF_FMRI identifier which specifies the smf service
#

MYNAME=`basename ${0}`
MYDIR=`dirname ${0}`

if [ -f /lib/svc/share/smf_include.sh ]
then
	. /lib/svc/share/smf_include.sh
fi

. ${MYDIR}/../etc/config
. ${MYDIR}/../../lib/functions_static
. ${MYDIR}/functions

debug_message "Method: ${MYNAME} ${1} - Begin"
${SET_DEBUG}

# Setting SMF_FMRI 
        
SMF_FMRI=${1}	

# getting the necessary parameters and setting the variables filled
# in from options if it is called via gds

get_fmri_parameters

# source the parameter file before the check
. ${PARFILE}

# perform the check
check_spsma
rc_val=${?}

debug_message "Method: ${MYNAME} ${1} - End"
exit ${rc_val}
