wlanwatchdog: fix confusing batman message

If there is no batman originator the kernel reports "No batman nodes in range"
which was counted as one originator.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2013-09-10 22:41:09 +02:00
parent 844b16ea98
commit 360bdb2d28
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ get_time() {
count_originators() {
local COUNT=0
if [ -n "$BATMAN_INTERFACE" ]; then
COUNT=$(tail -n +3 /sys/kernel/debug/batman_adv/$BATMAN_INTERFACE/originators 2> /dev/null | wc -l)
COUNT=$(tail -n +3 /sys/kernel/debug/batman_adv/$BATMAN_INTERFACE/originators 2> /dev/null | grep -v "nodes in range" | wc -l)
fi
echo $COUNT
}