applications/luci-olsr: add support for mdns plugin
[project/luci.git] / applications / luci-olsr / luasrc / model / cbi / olsr / olsrdplugins.lua
index f760c99..48dca0a 100644 (file)
@@ -2,6 +2,7 @@
 LuCI - Lua Configuration Interface
 
 Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
@@ -17,7 +18,7 @@ require("luci.ip")
 
 
 if arg[1] then
-       mp = Map("olsrd", "OLSR - Plugins")
+       mp = Map("olsrd", translate("olsrd_plugins", "OLSR - Plugins"))
 
        p = mp:section(TypedSection, "LoadPlugin")
        p:depends("library", arg[1])
@@ -26,6 +27,7 @@ if arg[1] then
        ign = p:option(Flag, "ignore", "Enable")
        ign.enabled  = "0"
        ign.disabled = "1"
+       ign.rmempty  = false
        function ign.cfgvalue(self, section)
                return Flag.cfgvalue(self, section) or "0"
        end
@@ -80,7 +82,7 @@ if arg[1] then
                        { ListValue,    "BmfMechanism",                 { "UnicastPromiscuous", "Broadcast" } },
                        { Value,                "BroadcastRetransmitCount",     "2" },
                        { Value,                "FanOutLimit",                  "4" },
-                       { DynamicList,  "NonOlsrIf",                    "eth1" }
+                       { DynamicList,  "NonOlsrIf",                    "br-lan" }
                },
 
                ["olsrd_dyn_gw.so.0.4"] = {
@@ -132,6 +134,15 @@ if arg[1] then
                        { Value,                "accept",                               "10.247.200.4" }
                },
 
+               ["olsrd_watchdog.so.0.1"] = {
+                       { Value,                "file",                                 "/var/run/olsrd.watchdog" },
+                       { Value,                "interval",                             "30" }
+               },
+
+               ["olsrd_mdns.so.1.0.0"] = {
+                       { DynamicList,  "NonOlsrIf",                    "br-lan" }
+               },
+
                ["olsrd_arprefresh.so.0.1"]             = {},
                ["olsrd_dot_draw.so.0.3"]               = {},
                ["olsrd_dyn_gw_plain.so.0.4"]   = {},
@@ -230,8 +241,9 @@ else
        end
 
        ign = t:option( Flag, "ignore", "Enabled" )
-       ign.enabled = "0"
+       ign.enabled  = "0"
        ign.disabled = "1"
+       ign.rmempty  = false
        function ign.cfgvalue(self, section)
                return Flag.cfgvalue(self, section) or "0"
        end