On redemarre uniquement les bornes de la liste
darcs-hash:20040906094343-d1718-1dbceeccd9a9e8d9d27055b499738f67c1a7d673.gz
This commit is contained in:
parent
d5cfbd4698
commit
a60988c663
1 changed files with 4 additions and 11 deletions
|
@ -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 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue