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 uci_model.inst = uci_model.cursor()
16 uci_model.inst_state = uci_model.cursor_state()
18 -- allow any password in local sdk
19 local sys = require "luci.sys"
20 sys.user.checkpasswd = function() return true end
22 -- dummy sysinfo on Darwin
25 if not nixio.sysinfo then
26 function nixio.sysinfo()
32 loads = { 0.0, 0.0, 0.0 },