From ade4a9d82e7f89a4f2aa65ad62502d7f723eb7fb Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Wed, 30 Sep 2015 23:29:21 +0200 Subject: [PATCH] portail_captif: corrige path vers ipset --- utils/portail_captif.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/portail_captif.py b/utils/portail_captif.py index df11f38b..cedd46d6 100644 --- a/utils/portail_captif.py +++ b/utils/portail_captif.py @@ -10,6 +10,7 @@ if '/usr/scripts' not in sys.path: import lc_ldap.shortcuts import lc_ldap.objets from iptools import AddrInNet, NetSubnets, IpSubnet +from gestion.gen_confs.ipset import IPSET_PATH def _get_ldap_connection(): return lc_ldap.shortcuts.lc_ldap_readonly(user=u'root') QUERY = _get_ldap_connection() @@ -91,7 +92,7 @@ def mac_from_ip(ip): def enable_access(ip): """Lance la commande idoine pour autoriser l'adresse IP""" - cmd = ['/usr/sbin/ipset', 'add', 'CONFIRMATION', ip] + cmd = [IPSET_PATH, 'add', 'CONFIRMATION', ip] p = subprocess.Popen(['sudo', '-n'] + cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)