luci-app-upnp: supress stderr when listing MINIUPNPD chain
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 28 Feb 2015 18:05:42 +0000 (19:05 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 28 Feb 2015 18:07:36 +0000 (19:07 +0100)
Current OpenWrt trunk now relays uhttpd stderr to syslog, so don't spam
it with "iptables: No chain/target/match by that name." when miniupnpd
is not configured but its status is queried by an overview page applet.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
applications/luci-app-upnp/luasrc/controller/upnp.lua

index 8fc697f..790bf29 100644 (file)
@@ -19,7 +19,7 @@ function index()
 end
 
 function act_status()
-       local ipt = io.popen("iptables --line-numbers -t nat -xnvL MINIUPNPD")
+       local ipt = io.popen("iptables --line-numbers -t nat -xnvL MINIUPNPD 2>/dev/null")
        if ipt then
                local fwd = { }
                while true do