+if ($valid_arg && (!defined($Config{$hostalias}))) {
+ $valid_arg = 0;
+}
+
+if (!$valid_arg) {
+ print STDERR "Usage: $0 options card-alias\n";
+ print STDERR "Options:\n";
+ print STDERR "\t-g property\tget property value\n";
+ print STDERR "\t-s property=val\tset property value\n";
+ print STDERR "\t-u\t\tpowerup\n";
+ 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";
+ print STDERR "\n";
+ print STDERR "card-alias\tone of: ";
+ foreach my $alias (keys(%Config)) {
+ print STDERR "\"${alias}\" ";
+ }
+ print STDERR "(see ~/.rsbs2rc)\n";
+ exit(1);
+}
+
+$host = ${$Config{$hostalias}}{"host"};
+$poweronms = ${$Config{$hostalias}}{"poweronms"} if (defined(${$Config{$hostalias}}{"poweronms"}));
+$poweroffms = ${$Config{$hostalias}}{"poweroffms"} if (defined(${$Config{$hostalias}}{"poweroffms"}));
+
+$sid = login(${$Config{$hostalias}}{"user"}, ${$Config{$hostalias}}{"pass"});
+
+if ($show) {
+ show_boarddesc();
+ board_properties();
+ show_all_vars();
+}
+
+if (@gprop) {
+ foreach my $p (@gprop) {
+ showprop($p);
+ }
+}
+
+if (@sprop) {
+ foreach my $p (@sprop) {
+ (my $pr, $v) = split(/=/,$p,2);
+ my $oldval = setprop($pr, $v);
+ if (defined($oldval)) {
+ print "${pr}: ${oldval} -> ${v}\n" if (!$verbose);