forked from ports/contrib
25 lines
853 B
Diff
25 lines
853 B
Diff
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]
|
|
--
|