summaryrefslogtreecommitdiff
path: root/Echolot/Config.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-02-16 05:46:54 +0000
committerPeter Palfrader <peter@palfrader.org>2003-02-16 05:46:54 +0000
commit88e90e95c7b92268618c2ed62b7621b03c77fc26 (patch)
treed24613c6c36824a88f3282509f90e897e8e4985e /Echolot/Config.pm
parent344db7406a5c425622d7082ccf6f54b0f2833178 (diff)
Check mixmaster binary on startup
Diffstat (limited to 'Echolot/Config.pm')
-rw-r--r--Echolot/Config.pm28
1 files changed, 26 insertions, 2 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm
index f0f3c12..89b33ae 100644
--- a/Echolot/Config.pm
+++ b/Echolot/Config.pm
@@ -1,7 +1,7 @@
package Echolot::Config;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Config.pm,v 1.51 2003/02/16 03:38:09 weasel Exp $
+# $Id: Config.pm,v 1.52 2003/02/16 05:46:54 weasel Exp $
#
=pod
@@ -102,9 +102,10 @@ sub init($) {
chainpinger_interval => 5*60, # send out pings every 5 minutes
chainping_every_nth_time => 810, # send out pings to the same chain every 810 calls, i.e. every 3 days
chainping_period => 10*24*60*60, # 12 days
- chainping_fudge => 0.7, # if less than 0.7 * rel1 * rel2 make it, the chain is really broken
+ chainping_fudge => 0.3, # if less than 0.3 * rel1 * rel2 make it, the chain is really broken
chainping_grace => 1.5, # don't count pings sent no longer than 1.5 * (lat1 + lat2) ago
chainping_update => 8*60*60, # chain stats should never be older than 8 hours
+ chainping_minsample => 3, # have at least sent 3 pings before judging any chain
addresses_default_ttl => 5, # getkeyconf seconds (days)
check_resurrection_ttl => 8, # check_resurrection seconds (weeks)
@@ -273,6 +274,29 @@ sub init($) {
};
};
+sub check_binaries() {
+ for my $bin (qw{mixmaster}) {
+ my $path = get()->{$bin};
+
+ if ($path =~ m#/#) {
+ Echolot::Log::warn ("$bin binary $path does not exist or is not executeable")
+ unless -x $path;
+ } else {
+ my $found = 0;
+ for my $pathelem (split /:/, $ENV{'PATH'}) {
+ $found = $pathelem, last
+ if -e $pathelem.'/'.$path;
+ };
+ if ($found) {
+ Echolot::Log::warn ("$bin binary $found/$path is not executeable")
+ unless -x $found.'/'.$path;
+ } else {
+ Echolot::Log::warn ("$bin binary $path not found");
+ };
+ };
+ };
+};
+
sub get() {
return $CONFIG;
};