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) :
|
class bornes_wifi(gen_config) :
|
||||||
""" Reconfiguration bornes wifi
|
""" 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
|
clef = '/etc/wifi/ssh/wifi' # Fichier clef ssh
|
||||||
|
@ -400,8 +400,8 @@ cat /tmp/autoexec.log | busybox logger -t "Statut"
|
||||||
def __str__(self) :
|
def __str__(self) :
|
||||||
return 'bornes wifi'
|
return 'bornes wifi'
|
||||||
|
|
||||||
def __init__(self,borne='') :
|
def __init__(self,bornes=[]) :
|
||||||
self.borne = borne
|
self.bornes = bornes
|
||||||
|
|
||||||
def _gen(self) :
|
def _gen(self) :
|
||||||
date = time.strftime('%A %d %B %Y %H:%M')
|
date = time.strftime('%A %d %B %Y %H:%M')
|
||||||
|
@ -420,14 +420,7 @@ cat /tmp/autoexec.log | busybox logger -t "Statut"
|
||||||
|
|
||||||
def restart(self) :
|
def restart(self) :
|
||||||
self.lock()
|
self.lock()
|
||||||
if self.borne :
|
for borne in self.bornes :
|
||||||
bornes = [ self.borne ]
|
|
||||||
else :
|
|
||||||
bornes = []
|
|
||||||
for b in self.base.search('puissance=*')['machine'] :
|
|
||||||
bornes.append( b.nom() )
|
|
||||||
|
|
||||||
for borne in bornes :
|
|
||||||
anim('\treboot de %s' % borne)
|
anim('\treboot de %s' % borne)
|
||||||
status, output = commands.getstatusoutput('ssh -i %s -o StrictHostKeyChecking=no root@%s reboot' % ( self.clef, borne ) )
|
status, output = commands.getstatusoutput('ssh -i %s -o StrictHostKeyChecking=no root@%s reboot' % ( self.clef, borne ) )
|
||||||
if status :
|
if status :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue