1 local SYSROOT = os.getenv("LUCI_SYSROOT")
4 local uci_core = require "uci"
5 local uci_model = require "luci.model.uci"
7 uci_model.cursor = function(config, save)
8 return uci_core.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
11 uci_model.cursor_state = function()
12 return uci_core.cursor(SYSROOT .. "/etc/config", SYSROOT .. "/var/state")
15 -- override uvl access
16 local uvl_model = require "luci.uvl"
17 local uvl_init = uvl_model.UVL.__init__
19 uvl_model.UVL.__init__ = function(self, schemedir)
20 uvl_init(self, schemedir or SYSROOT .. "/lib/uci/schema")
23 -- allow any password in local sdk
24 local sys = require "luci.sys"
25 sys.user.checkpasswd = function() return true end