#!/bin/sh
#
# 
# Description:	wrapper of OCF RA db2, based on original heartbeat RA.
#		See OCF RA db2 for more information. 
#
# Author:	Xun Sun <xunsun@cn.ibm.com>
# Support:	linux-ha@lists.linux-ha.org
# License:	GNU General Public License (GPL)
# Copyright:	(C) 2005 International Business Machines, Inc.
#
# An example usage in /etc/ha.d/haresources: 
#       node1  10.0.0.170 db2::db2inst1
#
# See usage() function below for more details...
#

. @HB_RA_DIR@/hto-mapfuncs

usage() {
    echo "usage: $0 db2-database-owner-id $LEGAL_ACTIONS"
    exit 1
}

if [ $# != 2 ]; then
    usage
fi

OCF_TYPE=db2
OCF_RESOURCE_INSTANCE=${OCF_TYPE}_$1
export OCF_TYPE OCF_RESOURCE_INSTANCE

OCF_RESKEY_instance=$1; export OCF_RESKEY_instance
ra_execocf $2
