Fixed some UCI transition fallout

This commit is contained in:
Steven Barth 2008-09-02 14:50:00 +00:00
parent b693e1ab91
commit 048fe5ce12
2 changed files with 6 additions and 5 deletions

View file

@ -17,11 +17,12 @@ vhost = luci.httpd.server.VHost()
server:set_default_vhost(vhost)
if pcall(require, "uci2") and pcall(require, "luci.model.uci") then
luci.model.uci.cursor = function(config, save)
return uci2.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
pcall(function()
require "uci"
require "luci.model.uci".cursor = function(config, save)
return uci.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
end
end
end)
require("luci.sys")
luci.sys.user.checkpasswd = function() return true end

View file

@ -25,7 +25,7 @@ function init(path)
if (root ~= '/') then
-- Entering dummy mode
luci.model.uci.cursor = function(config, ...)
return uci2.cursor(config or root .. "/etc/config", ...)
return uci.cursor(config or root .. "/etc/config", ...)
end
luci.sys.hostname = function() return "" end