luci-app-bmx6: fixes error line in logread #578 579/head
authorPedro hates github.com <39959198+pedro-nonfree@users.noreply.github.com>
Sun, 14 Jun 2020 23:53:12 +0000 (01:53 +0200)
committerpedrolab <531310-pedrolab@users.noreply.gitlab.com>
Mon, 15 Jun 2020 16:08:53 +0000 (18:08 +0200)
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>
luci-app-bmx6/bmx6/www/cgi-bin/bmx6-info

index ceebbbb37264c941d1c761e6edbf5278bd9412b0..8f5555e59949b9abb7d365a3794c4026c6b62564 100755 (executable)
@@ -101,7 +101,7 @@ fi
 
 if [ "$QUERY" == 'tunnels' ]; then
   tunnels=$(bmx6 -c --jshow tunnels /r=0)
-  if [ -z $tunnels ]; then
+  if [ -z "$tunnels" ]; then
     echo '{ "tunnels" : [] }'
   else
     echo $tunnels