Managing HP Serviceguard A.11.20.20 for Linux, March 2014

# * --------------------------------- *
# * The following utility functions are sourced in from $SG_UTILS *
# * ($SGCONF/scripts/mscripts/utils.sh) and available for use: *
# * *
# * sg_log <log level> <log msg> *
# * *
# * By default, only log messages with a log level of 0 will *
# * be output to the log file. If parameter "log_level" is *
# * configured in the package configuration file, then log *
# * messages that have a log level that is equal to or *
# * greater than the configured log level will be output. *
# * *
# * In addition, the format of the time stamp is prefixed in *
# * front of the log message. *
# * *
# * *
# **********************************************************************
#
###################################################################
###########################################
# Initialize the variables & command paths
###########################################
#set the path for the command rm
<RM= PATH>
###########################
# Source utility functions.
###########################
if [[ -z $SG_UTILS ]]
then
. /etc/cmcluster.conf
SG_UTILS=$SGCONF/scripts/mscripts/utils.sh
fi
if [[ -f ${SG_UTILS} ]]
then
. ${SG_UTILS}
if (( $? != 0 ))
then
echo "ERROR: Unable to source package utility functions file: ${SG_UTILS}"
exit 1
fi
else
echo "ERROR: Unable to find package utility functions file: ${SG_UTILS}"
exit 1
fi
###########################################
# Source the package environment variables.
###########################################
typeset postfix=$(date +"%H.%M.%S")
SG_ENV_FILE=/var/tmp/${SG_PACKAGE}.$postfix.$$.tmp
$SGSBIN/cmgetpkgenv $SG_PACKAGE > $SG_ENV_FILE
if (( $? != 0 ))
then
echo "ERROR: Unable to retrieve package attributes."
exit 1
fi
. $SG_ENV_FILE
$RM -f $SG_ENV_FILE
#########################################################################
#
# start_command
#
# This function should define actions to take when the package starts
#
#########################################################################
function start_command
304 Monitoring Script for Generic Resources