Ticket #40121: patch-setup.py.diff
File patch-setup.py.diff, 2.2 KB (added by nonstop.server@…, 11 years ago) |
---|
-
setup.py
old new 29 29 from glob import glob 30 30 31 31 longdesc = ''' 32 Fail2Ban scans log files like /var/log/pwdfail or33 /var/log/apache/error_log and bans IP that makes32 Fail2Ban scans log files like @@PREFIX@@/var/log/pwdfail or 33 @@PREFIX@@/var/log/apache/error_log and bans IP that makes 34 34 too many password failures. It updates firewall rules 35 35 to reject the IP address or executes user defined 36 36 commands.''' … … 56 56 'server' 57 57 ], 58 58 data_files = [ 59 (' /etc/fail2ban',59 ('@@PREFIX@@/etc/fail2ban', 60 60 glob("config/*.conf") 61 61 ), 62 (' /etc/fail2ban/filter.d',62 ('@@PREFIX@@/etc/fail2ban/filter.d', 63 63 glob("config/filter.d/*.conf") 64 64 ), 65 (' /etc/fail2ban/action.d',65 ('@@PREFIX@@/etc/fail2ban/action.d', 66 66 glob("config/action.d/*.conf") 67 67 ), 68 (' /var/run/fail2ban',68 ('@@PREFIX@@/var/run/fail2ban', 69 69 '' 70 70 ), 71 (' /usr/share/doc/fail2ban',71 ('@@PREFIX@@/share/doc/fail2ban', 72 72 ['README.md', 'DEVELOP', 'doc/run-rootless.txt'] 73 73 ) 74 74 ] … … 78 78 # Search for obsolete files. 79 79 obsoleteFiles = [] 80 80 elements = { 81 " /etc/":81 "@@PREFIX@@/etc/": 82 82 [ 83 83 "fail2ban.conf" 84 84 ], 85 " /usr/bin/":85 "@@PREFIX@@/usr/bin/": 86 86 [ 87 87 "fail2ban.py" 88 88 ], 89 " /usr/lib/fail2ban/":89 "@@PREFIX@@/usr/lib/fail2ban/": 90 90 [ 91 91 "version.py", 92 92 "protocol.py" … … 109 109 print "\t" + f 110 110 print 111 111 112 if isdir(" /usr/lib/fail2ban"):112 if isdir("@@PREFIX@@/lib/fail2ban"): 113 113 print 114 print "Fail2ban is not installed under /usr/lib anymore. The new " \115 "location is under /usr/share. Please remove the directory " \116 " /usr/lib/fail2ban and everything under this directory."114 print "Fail2ban is not installed under @@PREFIX@@/lib anymore. The new " \ 115 "location is under @@PREFIX@@/share. Please remove the directory " \ 116 "@@PREFIX@@/lib/fail2ban and everything under this directory." 117 117 print 118 118 119 119 # Update config file 120 120 if argv[1] == "install": 121 121 print 122 122 print "Please do not forget to update your configuration files." 123 print "They are in /etc/fail2ban/."123 print "They are in @@PREFIX@@/etc/fail2ban/." 124 124 print