forked from freifunk-franken/firmware
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 <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
16f1b7c8d4
commit
ce90577b5d
|
@ -181,12 +181,11 @@ crawl() {
|
||||||
BAT_ADV_ORIGINATORS=`batctl o -n | awk '/O/ {next} /B/ {next} {print}'`
|
BAT_ADV_ORIGINATORS=`batctl o -n | awk '/O/ {next} /B/ {next} {print}'`
|
||||||
count=0;
|
count=0;
|
||||||
for row in $BAT_ADV_ORIGINATORS; do
|
for row in $BAT_ADV_ORIGINATORS; do
|
||||||
|
row="${row//[\(\)]/}"
|
||||||
originator=`echo $row | awk '{print $1}'`
|
originator=`echo $row | awk '{print $1}'`
|
||||||
last_seen=`echo $row | awk '{print $2}'`
|
last_seen=`echo $row | awk '{print $2}'`
|
||||||
last_seen="${last_seen//s/}"
|
last_seen="${last_seen//s/}"
|
||||||
link_quality=`echo $row | awk '{print $3}'`
|
link_quality=`echo $row | awk '{print $3}'`
|
||||||
link_quality="${link_quality//(/}"
|
|
||||||
link_quality="${link_quality//)/}"
|
|
||||||
outgoing_interface=`echo $row | awk '{print $6}'`
|
outgoing_interface=`echo $row | awk '{print $6}'`
|
||||||
outgoing_interface="${outgoing_interface//]:/}"
|
outgoing_interface="${outgoing_interface//]:/}"
|
||||||
nexthop=`echo $row | awk '{print $4}'`
|
nexthop=`echo $row | awk '{print $4}'`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user