From 617af247e1e9835cac7ef4629dcecc57d03498a2 Mon Sep 17 00:00:00 2001
From: Bjoern Franke <bjo@nord-west.org>
Date: Wed, 9 Apr 2014 12:50:56 +0200
Subject: [PATCH] nodewatcher: use batctl instead of brctl for counting
 clients, thx to tcatm

---
 nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh b/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
index 8d1d8e6..e543805 100755
--- a/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
+++ b/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
@@ -173,13 +173,8 @@ crawl() {
     fi
     err "`date`: Collecting information about conected clients"
 	#CLIENTS
-    SEDDEV=$(brctl showstp $MESH_INTERFACE | awk '/\([0-9]\)/ {
-            sub("\\(", "", $0)
-            sub("\\)", "", $0)
-            print "s/^  "$2"/"$1"/;"
-        }')
 
-    client_count=$(brctl showmacs $MESH_INTERFACE | sed -e "$SEDDEV" | egrep -c "(${CLIENT_INTERFACES// /|}).*no")
+    client_count=$(($(batctl tl|wc -l) - 2))
 
     err "`date`: Putting all information into a XML-File and save it at "$SCRIPT_DATA_FILE
 
-- 
GitLab