forked from freifunk-franken/firmware
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:
parent
844b16ea98
commit
360bdb2d28
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue