summaryrefslogtreecommitdiffhomepage
path: root/build/setup.lua
diff options
context:
space:
mode:
Diffstat (limited to 'build/setup.lua')
-rw-r--r--build/setup.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/setup.lua b/build/setup.lua
new file mode 100644
index 000000000..dbe9bdcc9
--- /dev/null
+++ b/build/setup.lua
@@ -0,0 +1,11 @@
+ 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
+