ipset: /usr/sbin -> /sbin dans jessie
This commit is contained in:
parent
f53e64a14d
commit
29fdd087c3
1 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,12 @@ sys.path.append('/usr/scripts/gestion')
|
|||
import commands
|
||||
import os
|
||||
|
||||
IPSET_PATH = '/sbin/ipset'
|
||||
|
||||
# Avant jessie: ipset était dans /usr/sbin
|
||||
if not os.path.exists(IPSET_PATH):
|
||||
IPSET_PATH = '/usr' + IPSET_PATH
|
||||
|
||||
class IpsetError(Exception):
|
||||
# Gestion des erreurs d'ipset
|
||||
def __init__(self,cmd,err_code,output):
|
||||
|
@ -31,7 +37,7 @@ class IpsetError(Exception):
|
|||
return "%s\n status : %s\n %s" % (self.cmd,self.err_code,self.output)
|
||||
|
||||
class Ipset(object):
|
||||
ipset="/usr/sbin/ipset"
|
||||
ipset=IPSET_PATH
|
||||
|
||||
def __str__(self):
|
||||
return self.set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue