luci-base: sys.lua: lazy-load luci.model.network
This allows using luci.sys without installed luci.model.network class. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
8234d03340
commit
1b835a50aa
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,6 @@ local table = require "table"
|
||||||
local nixio = require "nixio"
|
local nixio = require "nixio"
|
||||||
local fs = require "nixio.fs"
|
local fs = require "nixio.fs"
|
||||||
local uci = require "luci.model.uci"
|
local uci = require "luci.model.uci"
|
||||||
local ntm = require "luci.model.network"
|
|
||||||
|
|
||||||
local luci = {}
|
local luci = {}
|
||||||
luci.util = require "luci.util"
|
luci.util = require "luci.util"
|
||||||
|
@ -537,6 +536,8 @@ end
|
||||||
wifi = {}
|
wifi = {}
|
||||||
|
|
||||||
function wifi.getiwinfo(ifname)
|
function wifi.getiwinfo(ifname)
|
||||||
|
local ntm = require "luci.model.network"
|
||||||
|
|
||||||
ntm.init()
|
ntm.init()
|
||||||
|
|
||||||
local wnet = ntm:get_wifinet(ifname)
|
local wnet = ntm:get_wifinet(ifname)
|
||||||
|
|
Loading…
Reference in a new issue