Utilisation de la metode hotspot() plutot que le champ info() pour savoir si
une borne est hotspot darcs-hash:20060311155029-d1718-d309442d2566a9e4ef5d1b46f8e8d3e3c082ae11.gz
This commit is contained in:
parent
b520059397
commit
2c09eff1af
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue