forked from freifunk-franken/firmware
bsp/default: nodewatcher: use bridge from iproute2
brctl isn't part of OpenWRT anymore. Rewrite the client-count to bridge util from iproute2 package. Another alternative may be to use "batctl tl" but there we get false positives for local interfaces. Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de> Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
This commit is contained in:
parent
c85e42988f
commit
700831d3b5
|
@ -2,7 +2,7 @@
|
||||||
# Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg
|
# Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg
|
||||||
# License; GPL v3
|
# License; GPL v3
|
||||||
|
|
||||||
SCRIPT_VERSION="33"
|
SCRIPT_VERSION="34"
|
||||||
|
|
||||||
test -f /tmp/started || exit
|
test -f /tmp/started || exit
|
||||||
|
|
||||||
|
@ -205,13 +205,11 @@ crawl() {
|
||||||
fi
|
fi
|
||||||
err "`date`: Collecting information about conected clients"
|
err "`date`: Collecting information about conected clients"
|
||||||
#CLIENTS
|
#CLIENTS
|
||||||
SEDDEV=$(brctl showstp $MESH_INTERFACE | awk '/\([0-9]\)/ {
|
client_count=0
|
||||||
sub("\\(", "", $0)
|
for clientif in ${CLIENT_INTERFACES}; do
|
||||||
sub("\\)", "", $0)
|
local cc=$(bridge fdb show br $MESH_INTERFACE brport $clientif | grep -v self | grep -v permanent -c)
|
||||||
print "s/^ "$2"/"$1"/;"
|
client_count=$((client_count + $cc))
|
||||||
}')
|
done
|
||||||
|
|
||||||
client_count=$(brctl showmacs $MESH_INTERFACE | sed -e "$SEDDEV" | egrep -c "(${CLIENT_INTERFACES// /|}).*no")
|
|
||||||
|
|
||||||
err "`date`: Putting all information into a XML-File and save it at "$SCRIPT_DATA_FILE
|
err "`date`: Putting all information into a XML-File and save it at "$SCRIPT_DATA_FILE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue