summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-common
diff options
context:
space:
mode:
authorBastian Bittorf <bb@npl.de>2016-12-13 21:38:29 +0100
committerBastian Bittorf <bb@npl.de>2016-12-13 21:38:29 +0100
commit8ca5d6da9640f78b67081f2d1edeb0a6d0ca2120 (patch)
tree85a301546de51ec3d5a9c97a5e47d1b81b287c61 /contrib/package/freifunk-common
parent524439cd1647e5d6d7b48f9c75ec5800a5444109 (diff)
freifunk-common: neigh.sh: work also with unprettyfied JSON output
Older OLSRd-version outputs JSON humanreadable over multiple lines. The introduced change in 524439cd1647e5d6d7b48f9c75ec5800a5444109 broke the output for those users. Fix that be a finer filter regex. Thanks to Thomas Huehn <thomas@net.t-labs.tu-berlin.de> for spotting that.
Diffstat (limited to 'contrib/package/freifunk-common')
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/bin/neigh.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/package/freifunk-common/files/usr/bin/neigh.sh b/contrib/package/freifunk-common/files/usr/bin/neigh.sh
index 59ea8f914..468ed7a3e 100755
--- a/contrib/package/freifunk-common/files/usr/bin/neigh.sh
+++ b/contrib/package/freifunk-common/files/usr/bin/neigh.sh
@@ -66,7 +66,7 @@ VARS="$VARS neighborLinkQuality:NLQ linkCost:Cost remoteHostname:Host"
for HOST in '127.0.0.1' '::1';do
json_init
- json_load "$( echo /links | nc $HOST 9090 | grep ^'{' )" # remove header/non-json
+ json_load "$( echo /links | nc $HOST 9090 | sed -n '/^[}{ ]/p' )" # remove header/non-json
if json_is_a links array;then
json_select links