summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-10-03 16:11:11 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-10-03 16:11:14 +0200
commit03a90f161a85bbd79a18a260ba0b702cd941f207 (patch)
treee49e1cf017cccdec3ffcbf277e9eada32c4849cc /modules
parentc10a7380bf91d0d78ab55471d6becc501752602f (diff)
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>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
index 07a96b2bf..a98d79080 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
@@ -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")