summaryrefslogtreecommitdiffhomepage
path: root/module/rpc-core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-05 19:27:30 +0000
committerSteven Barth <steven@midlink.org>2008-05-05 19:27:30 +0000
commitcc729464f9ba3cbeb52b3fea313780ad0ccc39af (patch)
treef51868aa70877f6a3d89fcbaf9ce5e0400618695 /module/rpc-core
parent2d95ace7895ea2ccaa7dd67b912ee0f303eafac5 (diff)
* Rewrote ffluci.http, ffluci.model.uci
* WARNING: API CHANGES FOR ffluci.http and ffluci.model.uci
Diffstat (limited to 'module/rpc-core')
-rw-r--r--module/rpc-core/src/controller/rpc/luciinfo.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/module/rpc-core/src/controller/rpc/luciinfo.lua b/module/rpc-core/src/controller/rpc/luciinfo.lua
index 8d10fa885..d4e5cb306 100644
--- a/module/rpc-core/src/controller/rpc/luciinfo.lua
+++ b/module/rpc-core/src/controller/rpc/luciinfo.lua
@@ -3,7 +3,7 @@ module("ffluci.controller.rpc.luciinfo", package.seeall)
function action_index()
local uci = ffluci.model.uci.StateSession()
- ffluci.http.textheader()
+ ffluci.http.set_content_type("text/plain")
-- General
print("luciinfo.api=1")
@@ -26,8 +26,14 @@ function action_index()
-- Freifunk
- local ff = uci:show("freifunk", true) or ""
- print(ff)
+ local ff = uci:sections("freifunk") or {}
+ for k, v in pairs(ff) do
+ if k:sub(1, 1) ~= "." then
+ for i, j in pairs(v) do
+ print("freifunk." .. k .. "." .. i .. "=" .. j)
+ end
+ end
+ end
end
function sanitize(val)