Fixed some UCI transition fallout
authorSteven Barth <steven@midlink.org>
Tue, 2 Sep 2008 14:50:00 +0000 (14:50 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 2 Sep 2008 14:50:00 +0000 (14:50 +0000)
libs/httpd/host/runluci
libs/sgi-webuci/root/usr/lib/boa/luci.lua

index f150cae..3c7ab07 100755 (executable)
@@ -17,11 +17,12 @@ vhost   = luci.httpd.server.VHost()
 
 server:set_default_vhost(vhost)
 
-if pcall(require, "uci2") and pcall(require, "luci.model.uci") then
-       luci.model.uci.cursor = function(config, save)
-               return uci2.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
+pcall(function()
+       require "uci"
+       require "luci.model.uci".cursor = function(config, save)
+               return uci.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
        end
-end
+end)
 
 require("luci.sys")
 luci.sys.user.checkpasswd = function() return true end
index 387d577..6cb019d 100644 (file)
@@ -25,7 +25,7 @@ function init(path)
        if (root ~= '/') then
                -- Entering dummy mode
                luci.model.uci.cursor = function(config, ...)
-                       return uci2.cursor(config or root .. "/etc/config", ...)
+                       return uci.cursor(config or root .. "/etc/config", ...)
                end
                
                luci.sys.hostname = function() return "" end