my $powdown = 0;
my $powcyc = 0;
my $reset = 0;
+my $resetrsbs2 = 0;
my @sprop = ();
my @gprop = ();
+my @xmlsend = ();
my $show = 0;
my $enable_debug = "";
my $save = "";
shift @ARGV;
last SWITCH;
};
+ /^-R$/ && do {
+ $resetrsbs2 = 1;
+ shift @ARGV;
+ last SWITCH;
+ };
/^-l$/ && do {
shift @ARGV;
$enable_debug = shift @ARGV;
shift @ARGV;
last SWITCH;
};
+ /^-X$/ && do {
+ shift @ARGV;
+ push @xmlsend, shift @ARGV;
+ last SWITCH;
+ };
/^-b$/ && do {
$showstat = 1;
shift @ARGV;
print STDERR "\t-d\t\tpowerdown\n";
print STDERR "\t-c\t\tpowercycle\n";
print STDERR "\t-r\t\treset\n";
+ print STDERR "\t-R\t\treset RSB S2 borad\n";
print STDERR "\t-x\t\tshow all properties, variables and settings\n";
print STDERR "\t-l IP\t\tsend SYSLOG debug messages to IP\n";
print STDERR "\t-b\t\tshow board/server status\n";
+ print STDERR "\t-X\t\tsend raw XML string (start with REQ tag)\n";
print STDERR "\t-v\t\tverbose\n";
print STDERR "\t-save file\tsave configuration to 'file'\n";
print STDERR "\t-load file\tload configuration from 'file'\n";
}
}
+if (@xmlsend) {
+ foreach my $x (@xmlsend) {
+ print Dumper(_req('<?xml version="1.0"?><?RMCXML version="1.0"?><RMCSEQ>'.$x.'</RMCSEQ>'));
+ }
+}
+
if ($save ne '') {
my @dontsave = qw(ENABLE_LAN_AUTONEG ENABLE_LAN_100 ENABLE_LAN_FDUPLEX
GATEWAY IP_ADDRESS NETMASK TFTP_FIRMWARE_FILE TFTP_ADDR_FIRMWARE
status();
}
+if ($resetrsbs2) {
+ print "Resetting board...\n";
+ _cmd("boardreset");
+ exit(0);
+}
+
logout();