diff --git a/gestion/gen_confs/firewall4.py b/gestion/gen_confs/firewall4.py index ace85c46..da1784fa 100755 --- a/gestion/gen_confs/firewall4.py +++ b/gestion/gen_confs/firewall4.py @@ -2,12 +2,16 @@ # -*- coding: utf-8 -*- - -import sys import os +import sys sys.path.append('/usr/scripts/gestion') sys.path.append('/usr/scripts/lc_ldap') +if os.getuid() != 0: + from affich_tools import coul + sys.stderr.write(coul("Il faut ĂȘtre root pour utiliser le firewall\n", 'gras')) + sys.exit(1) + from config import NETs, blacklist_sanctions, blacklist_sanctions_soft, mac_komaz, mac_titanic import config.firewall