diff options
-rw-r--r-- | Echolot/Config.pm | 16 | ||||
-rw-r--r-- | TODO | 1 | ||||
-rwxr-xr-x | pingd | 20 |
3 files changed, 33 insertions, 4 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 057b6ee..7e7a55a 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.5 2002/07/02 17:04:21 weasel Exp $ +# $Id: Config.pm,v 1.6 2002/07/02 17:12:45 weasel Exp $ # =pod @@ -84,5 +84,19 @@ sub get() { return $CONFIG; }; +sub dump() { + # FIXME XML::Dumper bug workaround + # There is a bug in pl2xml that changes data passed (cf. Debian Bug #148969 and #148970 + # at http://bugs.debian.org/148969 and http://bugs.debian.org/148970 + require Data::Dumper; + my $storedata; + eval ( Data::Dumper->Dump( [ $CONFIG ], [ 'storedata' ] )); + + my $dump = new XML::Dumper; + my $data = $dump->pl2xml($storedata); + + print $data; +}; + 1; # vim: set ts=4 shiftwidth=4: @@ -3,7 +3,6 @@ for 2.0: make a private [rm]list showing all remailers ping cpunk without pgponly in clear too configure pinging options (i.e. cpunkt-{rsa,dsa,none}, mix) - add showconf command for later: rotate secret @@ -1,7 +1,7 @@ #!/usr/bin/perl -wT # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: pingd,v 1.9 2002/07/02 17:03:12 weasel Exp $ +# $Id: pingd,v 1.10 2002/07/02 17:12:45 weasel Exp $ # =pod @@ -22,6 +22,8 @@ pingd - echolot ping daemon =item B<pingd> B<set> option=value [option=value..] I<address> [I<address> ...] +=item B<pingd> B<dumpconf> + =back =head1 DESCRIPTION @@ -80,9 +82,21 @@ either B<on> or B<off>. =back +=item B<dumpconf> + +Dumps the current configuration to standard output. + =head1 OPTIONS -none +=over + +=item --verbose + +Verbose mode. Causes B<pingd> to print debugging messages about its progress. + +=item --help + +Print a short help and exit sucessfully. =back @@ -237,6 +251,8 @@ if ($COMMAND eq 'add') { Echolot::Globals::get()->{'storage'}->commit(); Echolot::Globals::get()->{'storage'}->finish(); +} elsif ($COMMAND eq 'dumpconf') { + Echolot::Config::dump(); } elsif ($COMMAND eq 'convert') { Echolot::Globals::initStorage(); setSigHandlers(); |