X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=build%2Fsetup.lua;h=f4ed76954817787878f139eb448bc4aec1391a11;hp=d8fd5ddb9790ddeb6780936ee8a59257594e278a;hb=14a9306e7d088455bd63bbf4ef65866e74f05ce2;hpb=7d0134fedc14794d68c9e9fe9dba60744d8ed8af diff --git a/build/setup.lua b/build/setup.lua index d8fd5ddb9..f4ed76954 100644 --- a/build/setup.lua +++ b/build/setup.lua @@ -15,17 +15,10 @@ 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 +sys.user.getpasswd = function() return "x" end -- dummy sysinfo on Darwin require "nixio" @@ -45,3 +38,9 @@ if not nixio.sysinfo then } end end + +-- override nixio.fs.access() to check sysroot first +local _access = nixio.fs.access +function nixio.fs.access(file) + return _access(SYSROOT .. "/" .. file) or _access(file) +end