Rewrote luci.config
This commit is contained in:
parent
f9a3de2234
commit
b693e1ab91
1 changed files with 11 additions and 6 deletions
|
@ -25,9 +25,14 @@ limitations under the License.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
module("luci.config",
|
local util = require "luci.util"
|
||||||
function(m)
|
|
||||||
if pcall(require, "luci.model.uci") then
|
local pcall = pcall
|
||||||
setmetatable(m, {__index = luci.model.uci.cursor():get_all("luci")})
|
local require = require
|
||||||
end
|
|
||||||
|
|
||||||
|
module "luci.config"
|
||||||
|
|
||||||
|
pcall(function()
|
||||||
|
util.update(_M, require "luci.model.uci".cursor():get_all("luci"))
|
||||||
end)
|
end)
|
Loading…
Reference in a new issue