#!/usr/bin/perl
# You should symlink to this program from the /etc/ha.d/resource.d directory.
# The name of the link should be that of the module name you
# want to use.
# Runs in terse hbResource mode (for heartbeat compliance)
use NOCpulse::Object;
use lib qw(/etc/rc.d/np.d);
use RootOnlyPlease;
use NOCpulse::Config;

$NOCpulse::Object::config = NOCpulse::Config->new('/etc/rc.d/np.d/SysV.ini');

my @stepName = split('/',$0);
my $stepName = pop(@stepName);
eval "require($stepName)";
if ($@) {
	print "$@\n";
	exit;
}
exit($stepName->newInitialized({'hbResourceMode'=>1})->run());
