warn "$ME: failed to close standard output: $!\n";
$? ||= 1;
}
# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
# "#END_VERSION_GENERATION" It is generated by the Makefile
#BEGIN_VERSION_GENERATION
$RELEASE_VERSION="";
$REDHAT_COPYRIGHT="";
$BUILD_DATE="";
#END_VERSION_GENERATION
# Get the program name from $0 and strip directory names
$_=$0;
$|=1;
s/.*\///;
my $pname = $_;
$esh="/opt/panmgr/bin/esh";
sub usage
{
print "Usage:\n";
print "\n";
print "$pname [options]\n";
print "\n";
print "Options:\n";
print " -c <string> cserver\n";
print " -h help\n";
print " -l <string> lpan\n";
print " -o <string> Action: reboot (default), off, on or status\n";
print " -p <string> pserver\n";
print " -u <string> username (default=root)\n";
print " -f <seconds> Wait X seconds before fencing is started\n";
print " -q quiet mode\n";
print " -V version\n";
exit 0;
}
sub fail
{
($msg)=@_;
print $msg."\n" unless defined $opt_q;
$t->close if defined $t;
exit 1;
}
sub fail_usage
{
($msg)=@_;
print STDERR $msg."\n" if $msg;
print STDERR "Please use '-h' for usage.\n";
exit 1;
}
sub version
{
print "$pname $RELEASE_VERSION $BUILD_DATE\n";
print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
exit 0;
}
sub print_metadata
{
print '<?xml version="1.0" ?>
<resource-agent name="fence_egenera" shortdesc="I/O Fencing agent for the Egenera BladeFrame" >
<longdesc>
fence_egenera is an I/O Fencing agent which can be used with the Egenera BladeFrame. It logs into a control blade (cserver) via ssh and operates on a process ing blade (pserver) identified by the pserver name and the logical process area network (LPAN) that it is in. fence_egenera requires that ssh keys have been setup so that the fence_egenera does not require a password to authenticate. Refer to ssh(8) for more information on setting up ssh keys.