projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8234d03
)
luci-base: sys.lua: lazy-load luci.model.network
author
Jo-Philipp Wich
<jo@mein.io>
Fri, 1 Nov 2019 12:42:30 +0000
(13:42 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Sat, 2 Nov 2019 19:14:25 +0000
(20:14 +0100)
This allows using luci.sys without installed luci.model.network class.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/sys.lua
b/modules/luci-base/luasrc/sys.lua
index f82cd78cb7bc5af933dc9f9f9f8c8d1a4849bb29..c8ad5393e04c78b6a3d507282d477ae5f87526c4 100644
(file)
--- a/
modules/luci-base/luasrc/sys.lua
+++ b/
modules/luci-base/luasrc/sys.lua
@@
-7,7
+7,6
@@
local table = require "table"
local nixio = require "nixio"
local fs = require "nixio.fs"
local uci = require "luci.model.uci"
-local ntm = require "luci.model.network"
local luci = {}
luci.util = require "luci.util"
@@
-537,6
+536,8
@@
end
wifi = {}
function wifi.getiwinfo(ifname)
+ local ntm = require "luci.model.network"
+
ntm.init()
local wnet = ntm:get_wifinet(ifname)