From ce90577b5df72dd3b38558bfea05322e083d552f Mon Sep 17 00:00:00 2001 From: Tim Niemeyer Date: Wed, 24 Oct 2012 20:44:00 +0200 Subject: [PATCH] Nodewatcher was confused if link_quality was below 100 When the link_quality is below below 100 there is a little whitespace between the value an the bracket like ( 99). This confused the awk skript and is fixed by filtering all brackets. Signed-off-by: Tim Niemeyer --- bsp/default/root_file_system/etc/nodewatcher.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bsp/default/root_file_system/etc/nodewatcher.sh b/bsp/default/root_file_system/etc/nodewatcher.sh index ce22e997..0e6644a2 100755 --- a/bsp/default/root_file_system/etc/nodewatcher.sh +++ b/bsp/default/root_file_system/etc/nodewatcher.sh @@ -181,12 +181,11 @@ crawl() { BAT_ADV_ORIGINATORS=`batctl o -n | awk '/O/ {next} /B/ {next} {print}'` count=0; for row in $BAT_ADV_ORIGINATORS; do + row="${row//[\(\)]/}" originator=`echo $row | awk '{print $1}'` last_seen=`echo $row | awk '{print $2}'` last_seen="${last_seen//s/}" link_quality=`echo $row | awk '{print $3}'` - link_quality="${link_quality//(/}" - link_quality="${link_quality//)/}" outgoing_interface=`echo $row | awk '{print $6}'` outgoing_interface="${outgoing_interface//]:/}" nexthop=`echo $row | awk '{print $4}'`