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