summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/controller
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-09-13 17:24:35 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-09-13 17:24:35 +0000
commitb00102c8b7ee5d282777706ddfc3b783dab3dfac (patch)
treeedbe6eeaff1e0daf62b19f1340bab7371d3683a5 /applications/luci-olsr/luasrc/controller
parent2a88e23db5715360aef9448c6a96415f5a5a11f4 (diff)
* luci/app-olsr: improved plugin handling
Diffstat (limited to 'applications/luci-olsr/luasrc/controller')
-rw-r--r--applications/luci-olsr/luasrc/controller/olsr.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua
index f7a8ec106e..c0a7f5fe6b 100644
--- a/applications/luci-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-olsr/luasrc/controller/olsr.lua
@@ -43,10 +43,24 @@ function index()
cbi("olsr/olsrdhna"), "HNA Announcements"
).i18n = "olsr"
- entry(
+ oplg = entry(
{"admin", "services", "olsrd", "plugins"},
cbi("olsr/olsrdplugins"), "Plugins"
- ).i18n = "olsr"
+ )
+ oplg.i18n = "olsr"
+ oplg.leaf = true
+
+ local uci = require("luci.model.uci").cursor()
+ uci:foreach("olsrd", "LoadPlugin",
+ function (section)
+ local lib = section.library
+ entry(
+ {"admin", "services", "olsrd", "plugins", lib },
+ cbi("olsr/olsrdplugins"),
+ nil --'Plugin "%s"' % lib:gsub("^olsrd_",""):gsub("%.so.+$","")
+ )
+ end
+ )
end
function action_index()