require("luci.dispatcher")
require("luci.sgi.webuci")
- require("uci")
+ require("luci.model.uci")
if (root ~= '/') then
-- Entering dummy mode
- uci.set_savedir(root..'/tmp/.uci')
- uci.set_confdir(root..'/etc/config')
+ luci.model.uci.cursor = function(config, ...)
+ return uci2.cursor(config or root .. "/etc/config", ...)
+ end
luci.sys.hostname = function() return "" end
luci.sys.loadavg = function() return 0,0,0,0,0 end
luci.sys.net.arptable = function() return {} end
luci.sys.net.devices = function() return {} end
- luci.sys.net.routes = function() return {} end
+ luci.sys.net.routes = function() return {} end
luci.sys.wifi.getiwconfig = function() return {} end
luci.sys.wifi.iwscan = function() return {} end
env.PATH_INFO = context.uri
env.REMOTE_PORT = context.remote_port
env.SERVER_ADDR = context.server_addr
+ env.HTTP_COOKIE = context.cookie
env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
- luci.sgi.webuci.initenv(env, vars)
- luci.dispatcher.httpdispatch()
+ luci.sgi.webuci.run(env, vars)
end