From eee7cac8f4fe9844a8883a011db02d3668756836 Mon Sep 17 00:00:00 2001 From: bernat Date: Thu, 10 Nov 2005 10:17:15 +0100 Subject: [PATCH] Menage dans syslog darcs-hash:20051110091715-d1718-69a2c5538e03c942d3a0cd65f439afa5f70f0d36.gz --- wifi/hotspot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wifi/hotspot.py b/wifi/hotspot.py index 55ab0573..26540e37 100755 --- a/wifi/hotspot.py +++ b/wifi/hotspot.py @@ -53,14 +53,14 @@ class Server: """Ajout d'une IP au firewall""" cmd = "pfctl -t clients_hotspot_autorises -Tadd %s" % ip if self.execute(cmd): - syslog(LOG_INFO | LOG_LOCAL3, "Nouveau client hotspots: %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Nouveau client hotspots: %s" % ip) def del_ip(self,ip): """Retire une règle du firewall""" cmd = "pfctl -t clients_hotspot_autorises -Tdelete %s" % ip if self.execute(cmd): - syslog(LOG_INFO | LOG_LOCAL3, "Suppression du client: %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Suppression du client: %s" % ip) def list_ips(self): """Liste les IP actuellement dans le firewall""" @@ -87,7 +87,7 @@ class Server: self.del_ip(ip) deleted=True if deleted: - syslog(LOG_INFO | LOG_LOCAL3, "Clients hotspots: %s" % (", ".join(self.list_ips())) or "aucun") + syslog(LOG_INFO | LOG_LOCAL3, "Clients hotspots: %s" % (", ".join(self.list_ips()) or "aucun")) def daemonize(self): """Passe en arrière plan""" @@ -122,9 +122,9 @@ class Server: result = select([s],[],[],60)[0] if result: # On a quelqu'un, on lit une ligne - syslog(LOG_INFO | LOG_LOCAL3, "Nouvelle requête") + syslog(LOG_INFO | LOG_LOCAL4, "Nouvelle requete") ip = self.socket.readline().strip() - syslog(LOG_INFO | LOG_LOCAL3, "Nouvelle requête pour l'IP : %s" % ip) + syslog(LOG_INFO | LOG_LOCAL4, "Nouvelle requete pour l'IP : %s" % ip) if re.match("^10\.231.*", ip): self.add_ip(ip) # Dans tous les cas, on vire les IP inutiles