Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 2acd34fd833ce754a3cc56ff5df10f83 > files > 19

heartbeat-2.1.3-7.3mdv2010.0.x86_64.rpm

#!/bin/sh
#
#
# License:      GNU General Public License (GPL)
# Support:      linux-ha@lists.linux-ha.org
#
#	This script is a test resource for introducing delay.
#
#	usage: $0  {start|stop|status|monitor}
#	usage: $0  delay {start|stop|status|monitor}
#	usage: $0  startdelay stopdelay {start|stop|status|monitor}
#
#	This is really a test resource script.
#

usage() {
  echo "usage: $0 [delay [stopdelay]] $LEGAL_ACTIONS"
  exit 1
}

. /etc/ha.d/resource.d//hto-mapfuncs

case $# in
  1)	op=$1;;
  2)	OCF_RESKEY_startdelay=$1; export OCF_RESKEY_startdelay; op=$2;;
  3)	OCF_RESKEY_startdelay=$1; 
	OCF_RESKEY_stopdelay=$2; 
	export OCF_RESKEY_startdelay OCF_RESKEY_stopdelay; 
	op=$3;;
  *)	usage;;
esac

if [ -z $OCF_RESKEY_startdelay ]; then
    OCF_RESKEY_startdelay=10
fi

OCF_TYPE=Delay
OCF_RESOURCE_INSTANCE=${OCF_TYPE}_${OCF_RESKEY_startdelay}
export OCF_TYPE OCF_RESOURCE_INSTANCE

ra_execocf $op