#!/bin/ksh93
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# 61haes_r714 src/43haes/usr/sbin/cluster/events/call_conc_replicated_methods.sh 1.6.2.1 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2005,2013 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)56        1.6.2.1  src/43haes/usr/sbin/cluster/events/call_conc_replicated_methods.sh, hacmp.events, 61haes_r714 9/23/13 04:21:36

    [[ "$VERBOSE_LOGGING" == "high" ]] && set -x
    version='1.6.2.1'
    PROGNAME=$(basename ${0})
    CALL_OUT=$1
    CONCURRENT_VOLUME_GROUP=$2
    rc=0

    METHODS=$(cl_rrmethods2call $CALL_OUT)
    
    for method in $METHODS
    do
	if [[ -x $method ]]
	then
	    $method $CONCURRENT_VOLUME_GROUP
	    RC=$?
	    : exit status of $method $CONCURRENT_VOLUME_GROUP is: $RC
	    case $RC in
		0)  #	Success
		    continue
		    ;;
		3)  #	Skip normal processing
		    rc=3
		    ;;
		*)  #	Something went wrong
		    rc=4
		    if [[ $CALL_OUT == *online ]]
		    then
			#
			:   Resource has failed to come on line.  Notify the cluster manager to take
			:   further action.
			#
			cl_RMupdate resource_error "$CONCURRENT_VOLUME_GROUP" $PROGNAME
		    fi
		    return $rc
		    ;;
		esac 
        fi
    done
    return $rc;
