1 |
diff -up ./denyhosts.py.orig ./denyhosts.py |
2 |
--- ./denyhosts.py.orig 2012-01-30 13:14:41.146715839 -0600 |
3 |
+++ ./denyhosts.py 2012-01-30 14:45:14.372539341 -0600 |
4 |
@@ -1,5 +1,6 @@ |
5 |
#!/usr/bin/env python |
6 |
import os |
7 |
+import platform |
8 |
import sys |
9 |
|
10 |
import DenyHosts.python_version |
11 |
@@ -107,6 +108,10 @@ if __name__ == '__main__': |
12 |
print "DenyHosts version:", VERSION |
13 |
sys.exit(0) |
14 |
|
15 |
+ # This is generally expected to be in the environment, but there's no |
16 |
+ # non-hackish way to get systemd to set it, so just hack it in here. |
17 |
+ os.environ['HOSTNAME'] = platform.node() |
18 |
+ |
19 |
prefs = Prefs(config_file) |
20 |
|
21 |
first_time = 0 |