diff options
author | Steven Barth <steven@midlink.org> | 2008-11-30 13:19:45 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-11-30 13:19:45 +0000 |
commit | b33943a6e8596c1ddfc1b771a995d3cf21e81cd6 (patch) | |
tree | 6f67cdea044e708a599a06712491b5c60db6f954 /libs/sgi-luci/hostfiles/usr/lib | |
parent | a7e7c31f8c659b55c1adb0863a8f2f66d3452d2b (diff) |
Merge LuCIttpd
Diffstat (limited to 'libs/sgi-luci/hostfiles/usr/lib')
-rw-r--r-- | libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua b/libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua new file mode 100644 index 0000000000..073e567c0a --- /dev/null +++ b/libs/sgi-luci/hostfiles/usr/lib/lucittpd/plugins/luci-webui.lua @@ -0,0 +1,29 @@ +function initialize() + pcall(function() + local SYSROOT = os.getenv("LUCI_SYSROOT") + require "uci" + require "luci.model.uci".cursor = function(config, save) + return uci.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci") + end + + local x = require "luci.uvl".UVL.__init__ + require "luci.uvl".UVL.__init__ = function(self, schemedir) + x(self, schemedir or SYSROOT .. "/lib/uci/schema") + end + + require("luci.sys") + luci.sys.user.checkpasswd = function() return true end + + require "luci.dispatcher" + require "luci.uvl" + require "luci.cbi" + require "luci.template" + require "luci.json" + end) +end + +-- Initialize LuCI +function register() + local lucihnd = require "luci.ttpd.handler.luci" + httpd.server:get_default_vhost():set_handler("/luci", lucihnd.Luci()) +end
\ No newline at end of file |