each time the luci view `network/bmx6/tunnels is displayed it shows results
each 5 seconds. It queries to a cgi script bmx6-info.sh that causes a strange
error in logread:
daemon.err uhttpd[pid]: sh: "tunnels":: unknown operand
Prior versions to 19.x release did not show it.
Signed-off-by: Pedro <pedrowrt@cas.cat>
The network topology of a BMX6 mesh can be obtained by asking all the nodes
about their links via the bmx6-info script. The wget() function in the
bmx6json.lua file is part of the process, but it often returns nil, even if
the remote data can actually be fetched, in what seems to be a race condition.
By calling the sys.exec("") function empty, the race condition disappears.
Dirty fix to https://github.com/openwrt-routing/packages/issues/436.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
The bmx6-info script will return null when no tunnels are known to BMX6.
However, the "Graph" and the "Tunnels" pages expect a JSON structure with an
array of tunnels. In case no tunnels are known to BMX6, bmx6-info now returns
'{ "tunnels" : [] }'.
Fixes#434
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
The JavaScript code of the network graph tried to fetch the topology from
%HOST/cgi-bin/luci/status/bmx6/topology, but the topology entry is now located
at admin->network->BMX6 (i.e., %HOST/cgi-bin/luci/admin/network/BMX6/topology).
Fixes#432
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>