From b72d4f8b4febf466c16d1d6775e4e4ba8746db83 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 13 Aug 2007 10:03:25 +0000 Subject: fix some missing variable declarations --- lib/Smokeping.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-24-g4f1b