#!/bin/sh
#
# 	License:      GNU General Public License (GPL)
# 	Support:      linux-ha@lists.linux-ha.org
#
#	This script is patterned after the Red Hat SysV init script system
#
#	It doesn't know how to do anything except to run other scripts...
#
#	Basically, it notifies the world of something that was sent around
#	via the heartbeat cluster network...
#

. $HA_FUNCS
RCDIR=$HA_DIR/rc.d

if [ -n "$HA_DEBUGLOG" ]; then
	exec >>$HA_DEBUGLOG 2>&1
fi

if
  [ ! -d $RCDIR ]
then
  ha_log "ERROR: $0: $RCDIR does not exist"
  exit 1
else
  if
    [ ! -x $RCDIR/$1 ]
  then
    ha_log "ERROR: $0: $RCDIR/$1: not executable"
    exit 1
  fi
fi

ha_log "info: Running $RCDIR/$1 $*"
exec $RCDIR/$1 "$@"
ha_log "ERROR: $0: $RCDIR/$1: cannot execute"
