summaryrefslogtreecommitdiff
blob: b7eae3595cb56448d1ccc8a7426614547e3b26c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff -ur ufw-0.32/setup.py ufw-0.32.new/setup.py
--- ufw-0.32/setup.py	2012-07-06 17:46:29.000000000 +0200
+++ ufw-0.32.new/setup.py	2012-07-30 15:28:31.874547818 +0200
@@ -225,41 +225,7 @@
 os.unlink(os.path.join('staging', 'ufw-init'))
 os.unlink(os.path.join('staging', 'ufw-init-functions'))
 
-iptables_exe = ''
-iptables_dir = ''
-
-for e in ['iptables']:
-    for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \
-                '/usr/local/bin']:
-        if e == "iptables":
-            if os.path.exists(os.path.join(dir, e)):
-                iptables_dir = dir
-                iptables_exe = os.path.join(iptables_dir, "iptables")
-                print("Found '%s'" % iptables_exe)
-            else:
-                continue
-
-        if iptables_exe != "":
-            break
-
-
-if iptables_exe == '':
-    print("ERROR: could not find required binary 'iptables'", file=sys.stderr)
-    sys.exit(1)
-
-for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
-    if not os.path.exists(os.path.join(iptables_dir, e)):
-        print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
-        sys.exit(1)
-
-(rc, out) = cmd([iptables_exe, '-V'])
-if rc != 0:
-    raise OSError(errno.ENOENT, "Could not find version for '%s'" % \
-                  (iptables_exe))
-version = re.sub('^v', '', re.split('\s', str(out))[1])
-print("Found '%s' version '%s'" % (iptables_exe, version))
-if version < "1.4":
-    print("WARN: version '%s' has limited IPv6 support. See README for details." % (version), file=sys.stderr)
+iptables_dir = '/sbin'
 
 setup (name='ufw',
       version=ufw_version,