summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2010-12-21 22:07:57 +0000
committerManuel Munz <freifunk@somakoma.de>2010-12-21 22:07:57 +0000
commit9dcf1d9e603ecf66fc67f3f110168a3e0a4f57fa (patch)
tree242bdbf84d754555b2bf127e317cf9b3db96f8c7 /modules
parent309d6adb9a2e700246412a11eb2a31f09e40e2db (diff)
Diffstat (limited to 'modules')
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/freifunk.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
index db4e00c1e..b9f551b1e 100644
--- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
@@ -15,6 +15,7 @@ module("luci.controller.freifunk.freifunk", package.seeall)
function index()
local i18n = luci.i18n.translate
+ local uci = require "luci.model.uci".cursor()
local page = node()
page.lock = true
@@ -79,9 +80,15 @@ function index()
entry({"freifunk", "map"}, template("freifunk-map/frame"), i18n("Karte"), 50)
entry({"freifunk", "map", "content"}, template("freifunk-map/map"), nil, 51)
- entry({"freifunk", "services"}, template("freifunk-services/services"), i18n("Services"), 60)
- entry({"freifunk", "services", "content"}, template("freifunk-services/services"), nil, 61)
+ uci:foreach("olsrd", "LoadPlugin", function(s)
+ if s.library == "olsrd_nameservice.so.0.3" then
+ has_serv = true
+ end
+ end)
+ if has_serv then
+ entry({"freifunk", "services"}, template("freifunk-services/services"), i18n("Services"), 60)
+ end
end
local function fetch_olsrd()