summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-08-13 05:58:10 +0000
committerPeter Palfrader <peter@palfrader.org>2002-08-13 05:58:10 +0000
commit75b84a911c38e0c911387bfee1d60411f3aa3420 (patch)
treec3e9e73d6cd242633a5d910ee6d0bd888f1dbae9
parent2bea959f375816ef517479d10828d14e17f40517 (diff)
Write a standard mix.cfg configuration file for mixmaster
-rw-r--r--Echolot/Pinger/Mix.pm18
-rw-r--r--NEWS5
2 files changed, 20 insertions, 3 deletions
diff --git a/Echolot/Pinger/Mix.pm b/Echolot/Pinger/Mix.pm
index f41f217..c5122cf 100644
--- a/Echolot/Pinger/Mix.pm
+++ b/Echolot/Pinger/Mix.pm
@@ -1,7 +1,7 @@
package Echolot::Pinger::Mix;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Mix.pm,v 1.5 2002/07/22 02:18:30 weasel Exp $
+# $Id: Mix.pm,v 1.6 2002/08/13 05:58:10 weasel Exp $
#
=pod
@@ -34,7 +34,7 @@ sub ping($$$$) {
print (F $keys->{$keyid}->{'key'},"\n\n");
};
close (F) or
- cluck("Cannot close $keyring"),
+ cluck("Cannot close $keyring: $!"),
return 0;
my $type2list = Echolot::Config::get()->{'mixhome'}.'/type2.list';
@@ -45,9 +45,21 @@ sub ping($$$$) {
print (F $keys->{$keyid}->{'summary'}, "\n");
};
close (F) or
- cluck("Cannot close $type2list"),
+ cluck("Cannot close $type2list: $!"),
return 0;
+ my $mixcfg = Echolot::Config::get()->{'mixhome'}.'/mix.cfg';
+ unless ( -e $mixcfg ) {
+ open (F, ">$mixcfg") or
+ cluck("Cannot open $mixcfg for writing: $!"),
+ return 0;
+ print (F "PUBRING pubring.mix\n");
+ print (F "TYPE2LIST type2.list\n");
+ close (F) or
+ cluck("Cannot close $mixcfg: $!"),
+ return 0;
+ };
+
$ENV{'MIXPATH'} = Echolot::Config::get()->{'mixhome'};
open(MIX, "|".Echolot::Config::get()->{'mixmaster'}." -m -S -l $chaincomma") or
cluck("Cannot exec mixpinger: $!"),
diff --git a/NEWS b/NEWS
index e3798ba..540d883 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Changes in version
+ * Write a standard mix.cfg configuration file for mixmaster.
+ It only sets PUBRING and TYPE2LIST. Needed for systems where
+ those values are overriden by systemwide defaults.
+
Changes in version 2.0beta27 - 2002-08-13
* Some small fixes to the Debian Package