Commit edf6838c authored by Leigh Stoller's avatar Leigh Stoller

Two small changes:

* Do not fetch the cisco MIBS inside an ElabInElab; takes too long and
  they are not needed.

* Add some timestamp output to "Phase" so I can see where the time is
  going. I'll pull this out later.
parent b2337e45
......@@ -24,6 +24,7 @@ my $PREFIX = '@prefix@';
my $SRCDIR = '@srcdir@';
my $TOP_SRCDIR = '@top_srcdir@';
my $DBNAME = "@TBDBNAME@";
my $ELABINELAB = @ELABINELAB@;
my $OURDOMAIN = '@OURDOMAIN@';
......@@ -654,16 +655,21 @@ Phase "NFSmounts", "Setting up NFS mounts", sub {
};
};
Phase "mibs", "Fetching Cisco MIBs", sub {
foreach my $mib (@CISCO_MIBS) {
my $localfile = "$MIBPATH/$mib.txt";
my $mibURL = "$CISCO_MIB_FTP/$mib.my";
Phase "$mib", "Fetching $mib", sub {
DoneIfExists($localfile);
FetchFileFatal($mibURL,$localfile);
};
}
};
#
# Not needed in an inner elab, and it takes a long time.
#
if (! $ELABINELAB) {
Phase "mibs", "Fetching Cisco MIBs", sub {
foreach my $mib (@CISCO_MIBS) {
my $localfile = "$MIBPATH/$mib.txt";
my $mibURL = "$CISCO_MIB_FTP/$mib.my";
Phase "$mib", "Fetching $mib", sub {
DoneIfExists($localfile);
FetchFileFatal($mibURL,$localfile);
};
}
};
}
Phase "cron", "Adding cron jobs", sub {
Phase "crontab", "Editing $CRONTAB", sub {
......
......@@ -9,6 +9,7 @@
# A simple library for use in the installation scripts, to make them seem a
# little more legitimate, instead of the quick hacks they are.
#
use POSIX qw(strftime);
#
# Make sure that output gets printed right away
......@@ -128,12 +129,14 @@ sub Phase($$$) {
#
# If we're a parent, and all sub-phases got skipped, we did too
#
my $stamp = POSIX::strftime("%H:%M:%S", localtime());
if ($hasSubPhase && $skipped && ($nonSkipped == 0)) {
print "[ Skipped ]\n";
print "[ Skipped ] ($stamp)\n";
$libinstall::phaseResults{$name} = "skip";
$$parentSkipped++;
} else {
print "[ Succeeded ]\n";
print "[ Succeeded ] ($stamp)\n";
$$parentNonSkipped++;
$libinstall::phaseResults{$name} = "succeed";
}
......
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