Commit cb88a7e0 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Piddly little changes.

parent 57c8e911
......@@ -264,7 +264,7 @@ foreach my $node ( keys %nodeos ) {
$UID = $SAVEUID;
#
# Okay, before we reboot lets really make sure. On FreeBSD, it might
# Okay, before we power cycle lets really make sure. On FreeBSD, it might
# have rebooted, but since the connection is terminated, system returns
# an error status. So, lets ping it again and if its pingable, the
# reboot must have failed. If it is not pingable, I assume that the
......
......@@ -107,7 +107,7 @@ if (system("$tbdir/tbreport -v $irfile 2>&1 > $repfile") != 0) {
# The web server will not be able to access the report file, so just
# dump it STDOUT and let the php script do something with it.
#
dumplog();
dumpreport();
print STDOUT "Setup Success\n";
exit 0;
......@@ -130,6 +130,17 @@ sub fatal()
}
sub dumplog()
{
if (open(IN, "$eid.log")) {
print STDOUT "Dumping $eid.log\n";
while (<IN>) {
print STDOUT "$_";
}
close(IN);
}
}
sub dumpreport()
{
if (open(IN, "$eid.report")) {
print STDOUT "Dumping $eid.report\n";
......
......@@ -111,12 +111,6 @@ readfifo $tmpioFP "SNMPIT: "
#outs "PLACEHOLDER - Verifying virtual network."
#outs "Setting up delays"
#if {[catch "exec $delay_setup $irFile >@ $logFp 2>@ $logFp" err]} {
# outs stderr "Error running $delay_setup. ($err)"
# exit 1
#}
outs "PLACEHOLDER - Copying disk images."
outs "Resetting OS and rebooting."
......@@ -134,6 +128,13 @@ if {[catch "exec cat $irFile | $ir2ifc | sort > $ifcfile 2>@ $logFp" err]} {
exit 1
}
outs "Setting up delay nodes"
if {[catch "exec $delay_setup $irFile >@ $logFp 2>@ $logFp" err]} {
outs stderr "Error running $delay_setup. ($err)"
exit 1
}
if {[catch "exec $ifcboot $pid $eid $ifcfile >@ $logFp 2>@ $logFp" err]} {
outs stderr "Error setting interfaces ($err)"
exit 1
......
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