From bff730e54ab4371b74b898568dbc14bffb870dfb Mon Sep 17 00:00:00 2001 From: dubost Date: Wed, 29 Nov 2006 10:27:22 +0100 Subject: [PATCH] Correction du bug concernant le status de l'IPSEC ca a l'air de marcher (machine sans racoon lanc fait ERREUR et les autres sont OK) C'est peut etre un peu sale mais je suis tres mauvais en regexp darcs-hash:20061129092722-c3cc4-535e14e86bc56d236d375c155e7d12aaef6371b0.gz --- gestion/whos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gestion/whos.py b/gestion/whos.py index 4919fd1e..36b64cb5 100755 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -489,7 +489,7 @@ def ipsec_ok(machine) : prefix = "ssh -i /usr/scripts/gestion/clef-encap root@ragnarok.crans.org " clients = globals()['clients_ipsec'] if clients == None: - clients = commands.getoutput("%snetstat -r -f encap | awk '($1 == \"0/0\") {print $3}'" % prefix).split("\n") + clients = [x.split("/")[0] for x in commands.getoutput("%snetstat -r -f encap | awk '($2 == \"0\") {print $6}'" % prefix).split("\n")] globals()['clients_ipsec'] = clients return machine.nom() in clients