From 51d023c6c42dac17e8e3e0a5d85c96b5de85f2e2 Mon Sep 17 00:00:00 2001 From: pauget Date: Tue, 7 Sep 2004 00:11:51 +0200 Subject: [PATCH] Les bornes aussi sont reconfigures grce la base. darcs-hash:20040906221151-41617-de0873281ed96d5ed85a3d54400b119f3ecf62fb.gz --- gestion/gen_confs/wifi.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gestion/gen_confs/wifi.py b/gestion/gen_confs/wifi.py index 1715a558..ef04a347 100755 --- a/gestion/gen_confs/wifi.py +++ b/gestion/gen_confs/wifi.py @@ -143,7 +143,7 @@ class bornes_wifi(gen_config) : clef = '/etc/wifi/ssh/wifi' # Fichier clef ssh # Fichier - AUTOEXEC = '/tmp/autoexec.sh' + AUTOEXEC = '/etc/wifi/ftp/autoexec.sh' autoexec = u"""#! /bin/sh #*********************************************************** @@ -417,7 +417,11 @@ cat /tmp/autoexec.log | busybox logger -t "Statut" BORNES += u'## MAC - IP - Canal - Puissance - Nom\n' for b in self.db.search('host=*.wifi.crans.org&puissance=*')['machine'] : self.anim.cycle() - BORNES += u'%s %s %s %s %s\n' % ( b.mac(), b.ip(), b.canal(), + try : + desc = b.info()[0] + except : + desc = 'Inconnu' + BORNES += u'# %s\n%s %s %s %s %s\n' % ( desc, b.mac(), b.ip(), b.canal(), b.puissance(), b.nom().split(".")[0] ) BORNES += u'## Fin liste des bornes' @@ -431,7 +435,7 @@ cat /tmp/autoexec.log | busybox logger -t "Statut" self.lock() for borne in self.bornes : anim('\treboot de %s' % borne) - status, output = commands.getstatusoutput('echo 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 || true' % ( self.clef, borne ) ) if status : print ERREUR if self.debug :