summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-08-13 14:21:07 +0200
committerTobi Oetiker <tobi@oetiker.ch>2007-08-13 14:21:07 +0200
commit6d1e217ce8d598b81b54a934c6ae8f7217445818 (patch)
treefbcfa12c1fd7562a650032a5abd88008ac5b6aca
parent1c948851e2075ec02d48ac30ebfd4efe9efb8453 (diff)
downloadsmokeping-6d1e217ce8d598b81b54a934c6ae8f7217445818.tar.gz
smokeping-6d1e217ce8d598b81b54a934c6ae8f7217445818.tar.xz
add all arguments to slave config call
-rw-r--r--lib/Smokeping.pm5
1 files changed, 4 insertions, 1 deletions
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}) {