summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch')
-rw-r--r--app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch b/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch
new file mode 100644
index 000000000000..cb39df977be6
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-2.6-single_config_switch.patch
@@ -0,0 +1,24 @@
+From: Marco Bertorello <marco@bertorello.ns0.it>
+Date: Thu, 14 Apr 2011 00:11:35 +0200
+Subject: 11_single_config_switch
+
+A patch to prevent denyhosts running with a double --config switch
+---
+ daemon-control-dist | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/daemon-control-dist b/daemon-control-dist
+index 9f42b60..14d0f70 100755
+--- a/daemon-control-dist
++++ b/daemon-control-dist
+@@ -144,7 +144,8 @@ if __name__ == '__main__':
+
+ try:
+ if option in ('start', 'restart', 'condrestart'):
+- if '--config' not in args and '-c' not in args:
++ anystartswith = lambda prefix, xs: any(map(lambda x: x.startswith(prefix), xs))
++ if not anystartswith('--config', args) and '-c' not in args:
+ args.append("--config=%s" % DENYHOSTS_CFG)
+
+ cmd = cases[option]
+--