Commit 3aca822b authored by Christopher Alfeld's avatar Christopher Alfeld

Number of fixes, cleanup code, and added prefixes.

parent 3f28a754
...@@ -14,9 +14,9 @@ proc outs {args} { ...@@ -14,9 +14,9 @@ proc outs {args} {
puts $logFp $s puts $logFp $s
} }
proc readfifo {fp} { proc readfifo {fp {prefix {}}} {
while {[gets $fp line] >= 0} { while {[gets $fp line] >= 0} {
outs $line outs $prefix$line
} }
} }
...@@ -90,11 +90,11 @@ foreach pair $nodemap { ...@@ -90,11 +90,11 @@ foreach pair $nodemap {
outs "Setting up VLANs" outs "Setting up VLANs"
if {[catch "exec $snmpit -debug -u -f $irFile >@ $logFp 2> $tmpio" err]} { if {[catch "exec $snmpit -debug -u -f $irFile >@ $logFp 2> $tmpio" err]} {
readfifo $tmpioFP readfifo $tmpioFP "SNMPIT: "
outs stderr "Error running $snmpit. ($err)" outs stderr "Error running $snmpit. ($err)"
exit 1 exit 1
} }
readfifo $tmpioFP readfifo $tmpioFP "SNMPIT: "
#outs "PLACEHOLDER - Verifying virtual network." #outs "PLACEHOLDER - Verifying virtual network."
outs "PLACEHOLDER - Copying disk images." outs "PLACEHOLDER - Copying disk images."
...@@ -112,5 +112,5 @@ outs "PLACEHOLDER - Installing secondary pacakages." ...@@ -112,5 +112,5 @@ outs "PLACEHOLDER - Installing secondary pacakages."
outs "PLACEHOLDER - Rebooting." outs "PLACEHOLDER - Rebooting."
outs "Testbed ready for use." outs "Testbed ready for use."
close $fifoFP close $tmpioFP
file delete -force $fifo file delete -force $tmpio
\ No newline at end of file \ No newline at end of file
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