X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/blobdiff_plain/874e09fb25df349f41d616ce1a3d6a58b35cbba3..2363a0d6a8cf44f7288e0795ff29e081ecf3a08f:/rsbs2
diff --git a/rsbs2 b/rsbs2
index 9102759..51a02d5 100755
--- a/rsbs2
+++ b/rsbs2
@@ -235,6 +235,27 @@ sub show_all_vars {
}
}
+sub syslog_debug {
+ my $destination_ip = shift;
+ my $bcast = shift;
+
+ $reqstr=''.${destination_ip}.''.${bcast}.'FALSE';
+ $res = _req($reqstr);
+ if ($res->{RESP}->{RC} ne '0x0') {
+ print "FAILED:".$res->{RESP}->{RC}."\n";
+ return;
+ }
+
+ $reqstr='TRUE0x10x1FALSE';
+ $res = _req($reqstr);
+ if ($res->{RESP}->{RC} ne '0x0') {
+ print "FAILED:".$res->{RESP}->{RC}."\n";
+ return;
+ }
+
+ print "Debug messages will be sent to ${destination_ip} (broadcast: ${bcast})\n";
+}
+
#Login...
my $response = $ua->get("http://${host}/cgi/challenge");
die $response->status_line if (!($response->is_success));
@@ -280,11 +301,12 @@ printf("byte 22: 0x%x\n", ord($board[22]));
#showprop("SERVER_POWER_ON_PULSE_MS");
#showprop("SERVER_POWER_OFF_MODE");
#showprop("SERVER_POWER_OFF_PULSE_MS");
-#showprop("AGENT_VERSION");
board_properties();
-show_all_vars();
+#show_all_vars();
+
+syslog_debug("255.255.255.255", "TRUE");
#server_power_on modes: (com/agilent/rmc/mgui/panels/PowerMgmtConf.class)
#0: l_pmconf_option_disabled
@@ -301,13 +323,16 @@ setprop("FP_REMOTE_POWER", "TRUE");
#PM Mode
setprop("SERVER_POWER_ON_MODE", sprintf("0x%x", $pmode));
setprop("SERVER_POWER_OFF_MODE", sprintf("0x%x", $pmode));
+#Hack: Abuse powercycloe for powerup and down...
+#setprop("SERVER_POWER_ON_PULSE_MS", "0x0");
#$reqstr=''.$boarddesc_new.'';
#print $reqstr."\n";
#print Dumper(_req($reqstr));
-#serveraction("hardreset");
+serveraction("hardreset");
serveraction("powerup");
serveraction("powerdown");
+serveraction("powercycle");
logout();