sub setprop ($$) {
my ($prop,$value) = @_;
- outfor 'mg-hosts setprops $prop',
+ outfor "mg-hosts setprops $prop",
"./mg-hosts setprops $machine -- $prop '$value'\n";
}
if ($pdu1) { $pdu='pdu1'; $port=$pdu1; }
if ($pdu2) { $pdu='pdu2'; $port=$pdu2; }
setprop 'PowerMethod', "msw --apc6 $pdu $port";
- }
+ };
reportno 'PowerMethod';
+
+ eval {
+ my $serial = $row->{'Comtrol 1'};
+ $serial =~ m#^(\d+)/ttyRP(\d+)$# or die "bad serial syntax\n";
+ my ($physport, $ttyrp) = ($1,$2);
+ $physport eq $ttyrp+1 or die "serial numbering mismatch\n";
+ setprop 'Serial', "sympathy serial0";
+ };
+ reportno 'Serial';
}
close $fh or die $!;