build: override sys.user.getpasswd and nixio.fs.access in sdk environment
This commit is contained in:
parent
005fd26cf6
commit
5dd25cf43e
1 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,7 @@ uci_model.inst_state = uci_model.cursor_state()
|
|||
-- 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"
|
||||
|
@ -37,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
|
||||
|
|
Loading…
Reference in a new issue