diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-08-13 12:03:25 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-08-13 12:03:25 +0200 |
commit | b72d4f8b4febf466c16d1d6775e4e4ba8746db83 (patch) | |
tree | 9c5456509f035c17be669ca6863884931b3eb8d8 | |
parent | c98e512bc9dd3f93eed5cad53476cc8b4fd803fd (diff) | |
download | smokeping-b72d4f8b4febf466c16d1d6775e4e4ba8746db83.tar.gz smokeping-b72d4f8b4febf466c16d1d6775e4e4ba8746db83.tar.xz |
fix some missing variable declarations
-rw-r--r-- | lib/Smokeping.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 7c79695..6084d0f 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -3499,8 +3499,9 @@ sub main (;$) { } initialize_debuglog if $opt{debug} or $opt{'debug-daemon'}; my $slave_cfg; + my $cfgfile = $opt{config} || $defaultcfg; if (exists $opt{'master-url'}){ # ok we go slave-mode - open my $fd, "<$secret" or die "ERROR: opening $secret: $!\n"; + open my $fd, "<$opt{'shared-secret'}" or die "ERROR: opening $secret: $!\n"; chomp(my $secret = <$fd>); close $fd; $slave_cfg = { @@ -3511,7 +3512,6 @@ sub main (;$) { # this should get us a config set from the server Smokeping::Slave::submit_results($slave_cfg,\$::cfg); } else { - my $cfgfile = $opt{config} || $defaultcfg; if(defined $opt{'check'}) { verify_cfg($cfgfile); exit 0; } if($opt{reload}) { load_cfg $cfgfile, 'noinit'; # we need just the piddir |