luci-mod-admin-full: status: survive broken DSL status output

Only attempt to call "dsl_func" if the dsl_control lucistat output could be
successfully evaluated.

Works around https://dev.openwrt.org/ticket/20607

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-10-03 16:11:11 +02:00
parent f21eb789e1
commit 8832d534e9

View file

@ -88,7 +88,9 @@
if has_dsl then
local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
local dsl_func = loadstring(dsl_stat)
rv.dsl = dsl_func()
if dsl_func then
rv.dsl = dsl_func()
end
end
luci.http.prepare_content("application/json")