--- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ return real_confdir = os.path.join('/etc') - real_statedir = os.path.join('/lib', 'ufw') + real_statedir = os.path.join('/usr', 'lib', 'ufw') real_prefix = self.prefix if self.home != None: real_confdir = self.home + real_confdir @@ -114,7 +114,7 @@ if self.root != None: prefix = self.root + real_prefix - script = os.path.join(prefix, 'sbin', 'ufw') + script = os.path.join(prefix, 'bin', 'ufw') manpage = os.path.join(prefix, 'share', 'man', 'man8', 'ufw.8') manpage_f = os.path.join(prefix, 'share', 'man', 'man8', \ 'ufw-framework.8') @@ -126,7 +126,7 @@ print("Updating staging/ufw to use %s" % (sys.executable)) subprocess.call(["sed", "-i", - "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g", + "1s%^#.*python.*%#!/usr/bin/python3%g", 'staging/ufw']) self.copy_file('staging/ufw', script) self.copy_file('doc/ufw.8', manpage) @@ -250,8 +250,7 @@ iptables_dir = '' for e in ['iptables']: - for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \ - '/usr/local/bin']: + for dir in ['/usr/bin']: if e == "iptables": if os.path.exists(os.path.join(dir, e)): iptables_dir = dir