From 6d1e217ce8d598b81b54a934c6ae8f7217445818 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 13 Aug 2007 12:21:07 +0000 Subject: add all arguments to slave config call --- lib/Smokeping.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Smokeping.pm') diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index c64f00e..ea78e06 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -3501,6 +3501,9 @@ sub main (;$) { my $slave_cfg; my $cfgfile = $opt{config} || $defaultcfg; if (exists $opt{'master-url'}){ # ok we go slave-mode + die "ERROR: no shared-secret defined along with master-url\n" unless $opt{'shared-secret'}; + die "ERROR: no cache-dir defined along with master-url\n" unless $opt{'cache-dir'}; + die "ERROR: no cache-dir ($opt{'cache-dir'}): $!\n" unless -d $opt{'cache-dir'}; open my $fd, "<$opt{'shared-secret'}" or die "ERROR: opening $opt{'shared-secret'} $!\n"; chomp(my $secret = <$fd>); close $fd; @@ -3510,7 +3513,7 @@ sub main (;$) { shared_secret => $secret, }; # this should get us a config set from the server - Smokeping::Slave::submit_results($slave_cfg,\$::cfg); + Smokeping::Slave::submit_results($slave_cfg,\$::cfg,undef,{},'',undef); } else { if(defined $opt{'check'}) { verify_cfg($cfgfile); exit 0; } if($opt{reload}) { -- cgit v1.2.3-24-g4f1b