summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-04-16 23:20:48 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-04-16 23:20:48 +0200
commite942ada8af8b54bb34b9a5a3a7ab34e7ae7ca347 (patch)
tree87f4dbb764a0a8c7891476c72fce8ce7ab51e061
parent4654618b5ca4b8c6b3bfb4d508eb1da8c47eddec (diff)
downloadsmokeping-e942ada8af8b54bb34b9a5a3a7ab34e7ae7ca347.tar.gz
smokeping-e942ada8af8b54bb34b9a5a3a7ab34e7ae7ca347.tar.xz
complain properly when the secrets file can not be read
-rw-r--r--CHANGES2
-rw-r--r--lib/Smokeping/Master.pm8
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c65cc91..6ed1360 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+* the 'ralf' fix for cgi which is not able to read the secrets file. -- tobi
+
* display "all the smoke" even when it gets cut at the top end of the graph
--tobi
diff --git a/lib/Smokeping/Master.pm b/lib/Smokeping/Master.pm
index f8704a0..9a78a31 100644
--- a/lib/Smokeping/Master.pm
+++ b/lib/Smokeping/Master.pm
@@ -210,8 +210,11 @@ sub get_secret {
close $hand;
return $1;
}
- }
- warn "WARNING: Opening $cfg->{Slaves}{secrets}: $!\n";
+ } else {
+ print "Content-Type: text/plain\n\n";
+ print "WARNING: Opening secrets file $cfg->{Slaves}{secrets}: $!\n";
+ return '__HORRIBLE_INLINE_SIGNALING__';
+ }
return;
}
@@ -227,6 +230,7 @@ sub answer_slave {
my $q = shift;
my $slave = $q->param('slave');
my $secret = get_secret($cfg,$slave);
+ return if $secret eq '__HORRIBLE_INLINE_SIGNALING__';
if (not $secret){
print "Content-Type: text/plain\n\n";
print "WARNING: No secret found for slave ${slave}\n";