summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rwxr-xr-xpingd38
2 files changed, 42 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 2254ac5..a19db11 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes in version - 2004
+ * Have new disable and enable commands which are shortcut
+ for set pingit=off showit=off fetch=off and =on respectively.
+
Changes in version 2.1.3 - 2004-04-20
* Improvements to pingd.conf(5) by Colin.
* Use 'Apr' instead of 'Arp' for April. closes: DebianBug#243504.
diff --git a/pingd b/pingd
index 2d3c45e..8c4dcbf 100755
--- a/pingd
+++ b/pingd
@@ -26,6 +26,10 @@ pingd - echolot ping daemon
=item B<pingd> B<delete> I<address> [I<address> ...]
+=item B<pingd> B<disable> I<address> [I<address> ...]
+
+=item B<pingd> B<enable> I<address> [I<address> ...]
+
=item B<pingd> B<set> option=value [option=value..] I<address> [I<address> ...]
=item B<pingd> B<setremailercaps> I<capsstring>
@@ -96,6 +100,18 @@ keys and confs.
Delete I<address> from the list of remailers to query for
keys and confs. Delete all statistics and keys for that remailer.
+Note that echolot will add back this remailer if it learns of it from other
+remailers again. If you do not want that, use the disable command.
+
+=item B<disable> I<address> [I<address> ...]
+
+Shorthand for B<set showit=off> B<pingit=off> B<fetch=off>. This makes echolot
+completely ignore that remailer, until you enable it again.
+
+=item B<enable> I<address> [I<address> ...]
+
+Shorthand for B<set showit=on> B<pingit=on> B<fetch=on>.
+
=item B<set> option=value [option=value..] I<address> [I<address> ...]
Possible options and values:
@@ -423,6 +439,23 @@ sub command_setremailercaps(@) {
};
};
+sub command_enabledisable (@) {
+ my @argv = @_;
+
+ my $command = shift @argv;
+ my $value;
+ if ($command eq 'enable') {
+ $value='on';
+ elsif ($command eq 'disable') {
+ $value='off';
+ else
+ die ("argument $command is not enable or disable. Shouldn't even be here.\n");
+ }
+ my @cmd = ("showit=$value", "pingit=$value", "fetch=$value");
+ push @cmd, @argv;
+ command_setremailercaps(@argv);
+}
+
sub command_deleteremailercaps(@) {
my @argv = @_;
@@ -678,6 +711,8 @@ if ($params->{'help'}) {
print (" process ... reopen outfile and process commands\n");
print (" add ... add a remailer address\n");
print (" delete ... delete a remailer address\n");
+ print (" disable ... disable a remailer\n");
+ print (" enable ... enable a remailer\n");
print (" set ... set remailer options\n");
print (" setremailercaps ... set remailer capabilities manually\n");
print (" deleteremailercaps ... delete remailer capabilities manually\n");
@@ -715,6 +750,9 @@ if ($COMMAND eq 'add' || $COMMAND eq 'delete') {
} elsif ($COMMAND eq 'set') {
command_set(@ARGV);
hup_if_wanted($params->{'nohup'});
+} elsif ($COMMAND eq 'enable' || $COMMAND eq 'disable') {
+ command_enabledisable(@ARGV);
+ hup_if_wanted($params->{'nohup'});
} elsif ($COMMAND eq 'deleteremailercaps') {
command_deleteremailercaps(@ARGV);
hup_if_wanted($params->{'nohup'});