]]--
-local uci = require("luci.model.uci")
-local util = require("luci.util")
-module("luci.config")
-
--- Warning! This is only for fallback and compatibility purporses! --
-main = {}
-
--- This is where stylesheets and images go
-main.mediaurlbase = "/luci/media"
-
--- Does anybody think about browser autodetect here?
--- Too bad busybox doesn't populate HTTP_ACCEPT_LANGUAGE
-main.lang = "de"
-
-
--- Now overwrite with UCI values
-local ucidata = uci.sections("luci")
-if ucidata then
- util.update(_M, ucidata)
-end
\ No newline at end of file
+module("luci.config",
+ function(m)
+ if pcall(require, "luci.model.uci") then
+ setmetatable(m, {__index = luci.model.uci.cursor():get_all("luci")})
+ end
+ end)
\ No newline at end of file