From 2c09eff1af191809c28291ec935ae5a87bd10c6c Mon Sep 17 00:00:00 2001 From: bernat Date: Sat, 11 Mar 2006 16:50:29 +0100 Subject: [PATCH] Utilisation de la metode hotspot() plutot que le champ info() pour savoir si une borne est hotspot darcs-hash:20060311155029-d1718-d309442d2566a9e4ef5d1b46f8e8d3e3c082ae11.gz --- gestion/gen_confs/wifi_ng.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gestion/gen_confs/wifi_ng.py b/gestion/gen_confs/wifi_ng.py index 0390d210..5481cb8f 100755 --- a/gestion/gen_confs/wifi_ng.py +++ b/gestion/gen_confs/wifi_ng.py @@ -46,9 +46,9 @@ class conf_wifi_ng(gen_config) : def _gen(self): self.anim=anim('\r\tRecherche base LDAP') - clients = self.db.search('host=*.wifi.crans.org&paiement=ok')['machine'] + \ + clients = self.db.search('host=*.wifi.crans.org&paiement=ok')['machineWifi'] + \ invite().machines() - bornes = self.db.search('host=*.wifi.crans.org&ipsec!=*')['machine'] + bornes = self.db.search('host=*.wifi.crans.org&canal=*')['borneWifi'] print OK if not self._bornes: @@ -102,14 +102,16 @@ class conf_wifi_ng(gen_config) : 'CANAL': borne.canal(raw=True), 'PUISSANCE': abs(int(borne.puissance() or 0)), 'ON': ((int(borne.puissance() or 0) > 0) and 1 or 0), + 'HOTSPOT': borne.hotspot() and 1 or 0, } fd.write(""" -variables="${variables} lan_ipaddr wan_hostname crans_channels txpower wl0_radio" +variables="${variables} lan_ipaddr wan_hostname crans_channels txpower wl0_radio crans_hotspot" NVRAM_lan_ipaddr=%(IP)s NVRAM_wan_hostname=%(HOST)s NVRAM_crans_channels=%(CANAL)s NVRAM_txpower=%(PUISSANCE)d NVRAM_wl0_radio=%(ON)d +NVRAM_crans_hotspot=%(HOTSPOT)d """ % data) # Dans le description, on peut avoir d'autres variables