[denyhosts] Make sure unlock patch actually applies....
Jason ティビツ
tibbs at fedoraproject.org
Tue Feb 10 22:09:20 UTC 2015
commit f30fc8d7188959ba496b7e604c003e4ea754eab5
Author: Jason Tibbitts <tibbs at math.uh.edu>
Date: Tue Feb 10 15:54:47 2015 -0600
Make sure unlock patch actually applies....
denyhosts-2.9-unlock.patch | 36 ++++++++++++++++++++++--------------
1 files changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/denyhosts-2.9-unlock.patch b/denyhosts-2.9-unlock.patch
index 347b4b0..346119b 100644
--- a/denyhosts-2.9-unlock.patch
+++ b/denyhosts-2.9-unlock.patch
@@ -1,8 +1,6 @@
-diff --git denyhosts.py denyhosts.py
-index b74a53d..39b5946 100755
---- denyhosts.py
-+++ denyhosts.py
-@@ -73,13 +73,14 @@ if __name__ == '__main__':
+--- denyhosts.py.orig 2015-02-10 15:01:58.758269738 -0600
++++ denyhosts.py 2015-02-10 15:53:30.025322429 -0600
+@@ -77,13 +77,14 @@
enable_debug = 0
purgeip = 0
upgrade099 = 0
@@ -10,21 +8,31 @@ index b74a53d..39b5946 100755
args = sys.argv[1:]
try:
(opts, getopts) = getopt.getopt(args, 'f:c:dinuvps?hV',
- ["file=", "ignore", "verbose", "debug",
+ ["file=", "ignore", "verbose", "debug",
"help", "noemail", "config=", "version",
"migrate", "purge", "purge-all", "purgeip", "daemon", "foreground",
- "sync", "upgrade099"])
+ "unlock", "sync", "upgrade099"])
- except GetoptError:
+ except:
print "\nInvalid command line option detected."
usage()
-@@ -147,7 +148,8 @@ if __name__ == '__main__':
+@@ -111,6 +112,8 @@
+ purge = 1
+ if opt in ('-s', '--sync'):
+ sync_mode = 1
++ if opt in ('-s', '--unlock'):
++ unlock = 1
+ if opt == '--daemon':
+ daemon = 1
+ if opt == '--foreground':
+@@ -152,6 +155,10 @@
+
lock_file = LockFile(prefs.get('LOCK_FILE'))
-
- if unlock:
-- lock_file.remove()
+
++ if unlock:
+ if os.path.isfile( prefs.get('LOCK_FILE') ):
-+ lock_file.remove()
-
++ lock_file.remove()
++
lock_file.create()
-
+
+ if upgrade099 and not (daemon or foreground):
More information about the scm-commits
mailing list