Pour dsactiver la partie radio d'une borne, il suffit de mettre une
puissance ngative. darcs-hash:20050222200331-d1718-4052b543c2ec33cb8f5ae50c0cdd7a5da2753b5f.gz
This commit is contained in:
parent
1e58ff46db
commit
bbd9ff226c
1 changed files with 11 additions and 4 deletions
|
@ -197,11 +197,17 @@ class bornes_wifi(gen_config) :
|
||||||
self.bornes = [b.nom() for b in bornes]
|
self.bornes = [b.nom() for b in bornes]
|
||||||
# Liste des bornes
|
# Liste des bornes
|
||||||
BORNES = u'## Liste des bornes -- source : base LDAP\n'
|
BORNES = u'## Liste des bornes -- source : base LDAP\n'
|
||||||
BORNES += u'## MAC - IP - Canal - Puissance - Nom\n'
|
BORNES += u'## MAC - IP - Canal - Puissance - Nom - Radio on/off\n'
|
||||||
for b in bornes :
|
for b in bornes :
|
||||||
self.anim.cycle()
|
self.anim.cycle()
|
||||||
BORNES += u'%s %s %s %s %s\n' % ( b.mac(), b.ip(), b.canal(),
|
BORNES += u'%s %s %s %d %s' % ( b.mac(), b.ip(), b.canal(),
|
||||||
abs(b.puissance()), b.nom().split(".")[0] )
|
abs(int(b.puissance())),
|
||||||
|
b.nom().split(".")[0] )
|
||||||
|
# Doit-on activer la partie radio ?
|
||||||
|
if int(b.puissance()) < 0:
|
||||||
|
BORNES += u' off\n'
|
||||||
|
else:
|
||||||
|
BORNES += u' on\n'
|
||||||
|
|
||||||
BORNES += u'## Fin liste des bornes'
|
BORNES += u'## Fin liste des bornes'
|
||||||
|
|
||||||
|
@ -210,7 +216,7 @@ class bornes_wifi(gen_config) :
|
||||||
fd.write("""
|
fd.write("""
|
||||||
get_config () {
|
get_config () {
|
||||||
|
|
||||||
grep -i $(nvram get et0macaddr) <<EOF | awk '{print "mac="$1 " ip="$2 " canal="$3 " puissance="$4 " nom="$5}'
|
grep -i $(nvram get et0macaddr) <<EOF | awk '{print "mac="$1 " ip="$2 " canal="$3 " puissance="$4 " nom="$5 " radio="$6}'
|
||||||
""")
|
""")
|
||||||
fd.write(BORNES)
|
fd.write(BORNES)
|
||||||
fd.write("\nEOF\n}\n")
|
fd.write("\nEOF\n}\n")
|
||||||
|
@ -237,6 +243,7 @@ get_config () {
|
||||||
os.system("ln -sf ../shared/firewall/auth-mac %s/201auth-mac" % target)
|
os.system("ln -sf ../shared/firewall/auth-mac %s/201auth-mac" % target)
|
||||||
os.system("ln -sf ../shared/firewall/macip %s/202firewall-macip" % target)
|
os.system("ln -sf ../shared/firewall/macip %s/202firewall-macip" % target)
|
||||||
os.system("ln -sf ../shared/firewall/ebtables %s/203firewall-ebtables" % target)
|
os.system("ln -sf ../shared/firewall/ebtables %s/203firewall-ebtables" % target)
|
||||||
|
os.system("ln -sf ../shared/utils/toggle-radio %s/301toggle-radio" % target)
|
||||||
print OK
|
print OK
|
||||||
|
|
||||||
self.unlock()
|
self.unlock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue