X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=build%2Fsetup.lua;h=7888d23eca0b58bc46dffcba77d2dd1e7fa37364;hb=15846f9124c647d22885d74eda59b281632c3b07;hp=f374da90f7967c4e9fce752ac4111062ccda798c;hpb=7aed1e4b9d3d608389a8b15ea800b8e75be967ef;p=project%2Fluci.git diff --git a/build/setup.lua b/build/setup.lua index f374da90f..7888d23ec 100644 --- a/build/setup.lua +++ b/build/setup.lua @@ -15,14 +15,25 @@ end uci_model.inst = uci_model.cursor() uci_model.inst_state = uci_model.cursor_state() --- override uvl access -local uvl_model = require "luci.uvl" -local uvl_init = uvl_model.UVL.__init__ - -uvl_model.UVL.__init__ = function(self, schemedir) - uvl_init(self, schemedir or SYSROOT .. "/lib/uci/schema") -end - -- allow any password in local sdk local sys = require "luci.sys" sys.user.checkpasswd = function() return true end + +-- dummy sysinfo on Darwin +require "nixio" + +if not nixio.sysinfo then + function nixio.sysinfo() + return { + bufferram = 0, + freehigh = 0, + freeram = 0, + freeswap = 0, + loads = { 0.0, 0.0, 0.0 }, + mem_unit = 1024, + procs = 0, + sharedram = 0, + totalhigh = 0 + } + end +end