Quand getopt supportera les arguments optionnels, on pourra filer une
borne reconfigurer en particulier. darcs-hash:20051230144100-d1718-7a7bd2251de49586e2b0ca980f2e7f1d8df535cb.gz
This commit is contained in:
parent
f650df94cf
commit
d6fbfa6bed
1 changed files with 7 additions and 3 deletions
|
@ -31,8 +31,9 @@ class conf_wifi_ng(gen_config) :
|
|||
|
||||
######################################FIN PARTIE DE CONFIGURATION
|
||||
|
||||
def __init__(self) :
|
||||
def __init__(self, bornes=None) :
|
||||
self.db = crans_ldap()
|
||||
self._bornes = bornes
|
||||
|
||||
def lockname(self):
|
||||
# On change le nom du lock pour avoir un nom unique pour tout ce qui
|
||||
|
@ -50,8 +51,9 @@ class conf_wifi_ng(gen_config) :
|
|||
bornes = self.db.search('host=*.wifi.crans.org&ipsec!=*')['machine']
|
||||
|
||||
print OK
|
||||
self.gen_isakmpd(clients)
|
||||
self.gen_macip(clients, bornes)
|
||||
if not self._bornes:
|
||||
self.gen_isakmpd(clients)
|
||||
self.gen_macip(clients, bornes)
|
||||
self.gen_bornes(bornes)
|
||||
self.anim=anim('\tfin reconfigurations')
|
||||
|
||||
|
@ -64,6 +66,8 @@ class conf_wifi_ng(gen_config) :
|
|||
COMMON = "%s/common" % ROOT
|
||||
DEFAULT = "%s/default" % ROOT
|
||||
for borne in bornes:
|
||||
if self._bornes and borne.nom().split(".")[0] not in self._bornes:
|
||||
continue
|
||||
self.anim=anim('\treconfiguration de %s' % borne.nom())
|
||||
# Il s'agit de faire l'union du répertoire common et du
|
||||
# répertoire propre (s'il existe) ou alors du répertoire default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue