diff --git a/gestion/gen_confs/wifi.py b/gestion/gen_confs/wifi.py index 7bc5a66d..8f2f7c60 100755 --- a/gestion/gen_confs/wifi.py +++ b/gestion/gen_confs/wifi.py @@ -130,7 +130,7 @@ Netmask= 0.0.0.0 class bornes_wifi(gen_config) : """ Reconfiguration bornes wifi - Si nom de borne fourni à l'initialisation restart uniquement celle-ci + Si noms de borne fourni à l'initialisation restart uniquement celle-ci """ clef = '/etc/wifi/ssh/wifi' # Fichier clef ssh @@ -400,8 +400,8 @@ cat /tmp/autoexec.log | busybox logger -t "Statut" def __str__(self) : return 'bornes wifi' - def __init__(self,borne='') : - self.borne = borne + def __init__(self,bornes=[]) : + self.bornes = bornes def _gen(self) : date = time.strftime('%A %d %B %Y %H:%M') @@ -420,14 +420,7 @@ cat /tmp/autoexec.log | busybox logger -t "Statut" def restart(self) : self.lock() - if self.borne : - bornes = [ self.borne ] - else : - bornes = [] - for b in self.base.search('puissance=*')['machine'] : - bornes.append( b.nom() ) - - for borne in bornes : + for borne in self.bornes : anim('\treboot de %s' % borne) status, output = commands.getstatusoutput('ssh -i %s -o StrictHostKeyChecking=no root@%s reboot' % ( self.clef, borne ) ) if status :