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:
parent
f21eb789e1
commit
8832d534e9
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue