Commit 7c05ecda authored by Mac Newbold's avatar Mac Newbold

Move var initialization before the first possible die() so END doesn't cause undef'd vars.

parent da47400b
......@@ -50,6 +50,11 @@ use Sys::Syslog;
# Do lots of db retries before we fail and die
$libdb::DBQUERY_MAXTRIES = 5;
# Set up some notification throttling
my $mailgap = 15; # in seconds
my $lastmail = time() - $mailgap + 2; # Send a digest of startup msgs after 2s.
my %msgs = ();
# Number of iterations (roughly, seconds) after which we'll reload
# information from the database. This is so we don't end up with information
# that's _too_ out of sync.
......@@ -124,11 +129,6 @@ my $TB_OSID_MBKERNEL = TB_OSID_MBKERNEL;
# This only gets used here, so it isn't in a lib constant.
my $TBFREENODE = "FREENODE";
# Set up some notification throttling
my $mailgap = 15; # in seconds
my $lastmail = time() - $mailgap + 2; # Send a digest of startup msgs after 2s.
my %msgs = ();
my $pidfile;
if ( $TB eq $REALTB ) {
$pidfile = "/var/run/stated.pid";
......
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