diff options
author | Steven Barth <steven@midlink.org> | 2008-11-02 22:07:28 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-11-02 22:07:28 +0000 |
commit | 096ff297556af01baa27d558d9fe107fcdfba9d9 (patch) | |
tree | 95d9e5abffcbf407e005fd1c7272008c91ceee49 /build | |
parent | 8767a20e405b9336cb40b37a877d7acd95518576 (diff) |
Tune cbi2uvl
Diffstat (limited to 'build')
-rwxr-xr-x | build/cbi2uvl.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/build/cbi2uvl.lua b/build/cbi2uvl.lua index 10d956738..e1d0c150d 100755 --- a/build/cbi2uvl.lua +++ b/build/cbi2uvl.lua @@ -31,6 +31,15 @@ if arg[2] then i18n.load(arg[2], "en") end +if arg[3] then + pcall(function() + require "uci" + require "luci.model.uci".cursor = function(config, save) + return uci.cursor(config or arg[3] .. "/etc/config", save or arg[3] .. "/tmp/.uci") + end + end) +end + local map = cbi.load(arg[1])[1] assert(map) @@ -45,7 +54,7 @@ if #map.description > 0 then print (" option description '%s'" % util.striptags(map.description)) end -for i, sec in pairs(map.children) do if util.instanceof(sec, cbi.TypedSection) then +for i, sec in pairs(map.children) do if util.instanceof(sec, cbi.AbstractSection) then print ("\nconfig section") print (" option name '%s'" % sec.sectiontype) print (" option package '%s'" % map.config) |