X-Git-Url: http://git.openwrt.org/?p=feed%2Frouting.git;a=blobdiff_plain;f=luci-app-bmx6%2Ffiles%2Fwww%2Fcgi-bin%2Fbmx6-info;h=52630816f76bef63c8d1363aee42490ecd8795a1;hp=931cbf68a4b4545246751e8cfc946fc7eeb93e33;hb=986cb126468602f41faa8e7d2fee21eee43b0e9c;hpb=074f6a55779ef07b24629db3e4801433fa5c9fa4 diff --git a/luci-app-bmx6/files/www/cgi-bin/bmx6-info b/luci-app-bmx6/files/www/cgi-bin/bmx6-info index 931cbf6..5263081 100644 --- a/luci-app-bmx6/files/www/cgi-bin/bmx6-info +++ b/luci-app-bmx6/files/www/cgi-bin/bmx6-info @@ -76,7 +76,7 @@ print_query() { } # If the query is a file, just printing the file - [ -f "$BMX6_DIR/$QUERY" ] && cat "$BMX6_DIR/$QUERY"; + [ -f "$BMX6_DIR/$1" ] && cat "$BMX6_DIR/$1"; } if [ "${QUERY##*/}" == "all" ]; then @@ -84,6 +84,13 @@ if [ "${QUERY##*/}" == "all" ]; then QALL=1 fi +if [ "$QUERY" == '$info' ]; then + echo '{ "info": [ ' + print_query status + echo -n "," + print_query interfaces + echo "] }" +fi if [ "$QUERY" == '$neighbours' ]; then QALL=1 @@ -97,7 +104,7 @@ if [ "$QUERY" == '$neighbours' ]; then exit 0 else if [ "$QUERY" == '$tunnels' ]; then - bmx6 -c --jshow tunnels + bmx6 -c --jshow tunnels /r=0 exit 0 else