Commit e526593d authored by Robert Ricci's avatar Robert Ricci

Make tbswap use new --redirect-err option to snmpit

parent c32e2059
......@@ -548,7 +548,7 @@ sub doSwapout($) {
($type == MODIFY && $ELABINELAB && Lan->GotTrunks($experiment))) {
TBDebugTimeStamp("snmpit started");
print STDERR "Removing VLANs.\n";
if (system("snmpit -r $pid $eid")) {
if (system("snmpit --redirect-err -r $pid $eid")) {
tberror({type => 'secondary', severity => SEV_SECONDARY,
error => ['vlan_reset_failed']},
"Failed to reset VLANs");
......@@ -570,7 +570,8 @@ sub doSwapout($) {
}
if (@stale) {
print "Removing stale vlans @stale\n";
system("snmpit -f ". join(" ", map("-o $_", @stale)));
system("snmpit --redirect-err -f ".
join(" ", map("-o $_", @stale)));
if ($?) {
tberror({type => 'summary', severity => SEV_SECONDARY,
error => ['vlan_reset_failed']},
......@@ -978,7 +979,7 @@ sub doSwapin($) {
if ($ELABINELAB || !$syncvlans) {
if (@diff) {
print "Removing obsolete vlans @diff\n";
system("snmpit -f ". join(" ", map("-o $_", @diff)));
system("snmpit --redirect-err -f ". join(" ", map("-o $_", @diff)));
if ($?) {
tberror({type => 'summary', severity => SEV_SECONDARY,
error => ['vlan_setup_failed']},
......@@ -989,7 +990,7 @@ sub doSwapin($) {
}
else {
print "Synchronizing VLANs.\n";
system("snmpit -X $pid $eid");
system("snmpit --redirect-err -X $pid $eid");
if ($?) {
tberror({type => 'summary', severity => SEV_SECONDARY,
error => ['vlan_setup_failed']},
......@@ -1308,7 +1309,7 @@ sub doSwapin($) {
($type != MODIFY || ($ELABINELAB || !$syncvlans))) {
print "Setting up VLANs.\n";
TBDebugTimeStamp("snmpit started");
if (system("snmpit -t $pid $eid")) {
if (system("snmpit --redirect-err -t $pid $eid")) {
tberror({type => 'summary', severity => SEV_SECONDARY,
error => ['vlan_setup_failed']},
"Failed to set up VLANs.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment