Add /etc/qubes path

This commit is contained in:
Christopher Laprise 2018-02-13 23:39:28 -05:00
parent a262574f85
commit 10aee73bd7
No known key found for this signature in database
GPG Key ID: 448568C8B281C952

View File

@ -64,14 +64,16 @@ class FirewallWorker(object):
def run_firewall_dir(self): def run_firewall_dir(self):
'''Run scripts dir contents, before user script''' '''Run scripts dir contents, before user script'''
script_dir_path = '/rw/config/qubes-firewall.d' script_dir_paths = ['/etc/qubes/qubes-firewall.d',
if not os.path.isdir(script_dir_path): '/rw/config/qubes-firewall.d']
return for script_dir_path in script_dir_paths:
for d_script in sorted(os.listdir(script_dir_path)): if not os.path.isdir(script_dir_path):
d_script_path = os.path.join(script_dir_path, d_script) continue
if os.path.isfile(d_script_path) and \ for d_script in sorted(os.listdir(script_dir_path)):
os.access(d_script_path, os.X_OK): d_script_path = os.path.join(script_dir_path, d_script)
subprocess.call([d_script_path]) if os.path.isfile(d_script_path) and \
os.access(d_script_path, os.X_OK):
subprocess.call([d_script_path])
def run_user_script(self): def run_user_script(self):
'''Run user script in /rw/config''' '''Run user script in /rw/config'''