summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/controller/olsr.lua
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-olsr/luasrc/controller/olsr.lua')
-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 f7a8ec106..c0a7f5fe6 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()