local ip = require "luci.ip"
uci:foreach("olsrd", "LoadPlugin", function(s)
- if s.library == "olsrd_nameservice.so.0.3" then
+ if s.library == "olsrd_nameservice" then
local services_file=s.services_file
if services_file and fs.access(services_file) then
has_services = true
local knownPlParams = {
- ["olsrd_bmf.so.1.5.3"] = {
+ ["olsrd_bmf"] = {
{ Value, "BmfInterface", "bmf0" },
{ Value, "BmfInterfaceIp", "10.10.10.234/24" },
{ Flag, "DoLocalBroadcast", "no" },
{ DynamicList, "NonOlsrIf", "br-lan" }
},
- ["olsrd_dyn_gw.so.0.4"] = {
+ ["olsrd_dyn_gw"] = {
{ Value, "Interval", "40" },
{ DynamicList, "Ping", "141.1.1.1" },
{ DynamicList, "HNA", "192.168.80.0/24", IpMask2Cidr, Cidr2IpMask }
},
- ["olsrd_httpinfo.so.0.1"] = {
+ ["olsrd_httpinfo"] = {
{ Value, "port", "80" },
{ DynamicList, "Host", "163.24.87.3" },
{ DynamicList, "Net", "0.0.0.0/0", Cidr2IpMask }
},
- ["olsrd_nameservice.so.0.3"] = {
+ ["olsrd_nameservice"] = {
{ DynamicList, "name", "my-name.mesh" },
{ DynamicList, "hosts", "1.2.3.4 name-for-other-interface.mesh" },
{ Value, "suffix", ".olsr" },
{ Value, "macs_change_script", "/path/to/script" }
},
- ["olsrd_quagga.so.0.2.2"] = {
+ ["olsrd_quagga"] = {
{ StaticList, "redistribute", {
"system", "kernel", "connect", "static", "rip", "ripng", "ospf",
"ospf6", "isis", "bgp", "hsls"
{ Value, "Distance", Range(0,255) }
},
- ["olsrd_secure.so.0.5"] = {
+ ["olsrd_secure"] = {
{ Value, "Keyfile", "/etc/private-olsr.key" }
},
- ["olsrd_txtinfo.so.0.1"] = {
+ ["olsrd_txtinfo"] = {
{ Value, "accept", "127.0.0.1" }
},
- ["olsrd_jsoninfo.so.0.0"] = {
+ ["olsrd_jsoninfo"] = {
{ Value, "accept", "127.0.0.1" },
{ Value, "port", "9090" },
{ Value, "UUIDFile", "/etc/olsrd/olsrd.uuid" },
},
- ["olsrd_watchdog.so.0.1"] = {
+ ["olsrd_watchdog"] = {
{ Value, "file", "/var/run/olsrd.watchdog" },
{ Value, "interval", "30" }
},
- ["olsrd_mdns.so.1.0.0"] = {
+ ["olsrd_mdns"] = {
{ DynamicList, "NonOlsrIf", "lan" }
},
- ["olsrd_p2pd.so.0.1.0"] = {
+ ["olsrd_p2pd"] = {
{ DynamicList, "NonOlsrIf", "lan" },
{ Value, "P2pdTtl", "10" }
},
- ["olsrd_arprefresh.so.0.1"] = {},
- ["olsrd_dot_draw.so.0.3"] = {},
- ["olsrd_dyn_gw_plain.so.0.4"] = {},
- ["olsrd_pgraph.so.1.1"] = {},
- ["olsrd_tas.so.0.1"] = {}
+ ["olsrd_arprefresh"] = {},
+ ["olsrd_dot_draw"] = {},
+ ["olsrd_dyn_gw_plain"] = {},
+ ["olsrd_pgraph"] = {},
+ ["olsrd_tas"] = {}
}
local knownPlParams = {
- ["olsrd_bmf.so.1.5.3"] = {
+ ["olsrd_bmf"] = {
{ Value, "BmfInterface", "bmf0" },
{ Value, "BmfInterfaceIp", "10.10.10.234/24" },
{ Flag, "DoLocalBroadcast", "no" },
{ DynamicList, "NonOlsrIf", "br-lan" }
},
- ["olsrd_dyn_gw.so.0.4"] = {
+ ["olsrd_dyn_gw"] = {
{ Value, "Interval", "40" },
{ DynamicList, "Ping", "141.1.1.1" },
{ DynamicList, "HNA", "192.168.80.0/24", IpMask2Cidr, Cidr2IpMask }
},
- ["olsrd_httpinfo.so.0.1"] = {
+ ["olsrd_httpinfo"] = {
{ Value, "port", "80" },
{ DynamicList, "Host", "163.24.87.3" },
{ DynamicList, "Net", "0.0.0.0/0", Cidr2IpMask }
},
- ["olsrd_nameservice.so.0.3"] = {
+ ["olsrd_nameservice"] = {
{ DynamicList, "name", "my-name.mesh" },
{ DynamicList, "hosts", "1.2.3.4 name-for-other-interface.mesh" },
{ Value, "suffix", ".olsr" },
{ Value, "macs_change_script", "/path/to/script" }
},
- ["olsrd_quagga.so.0.2.2"] = {
+ ["olsrd_quagga"] = {
{ StaticList, "redistribute", {
"system", "kernel", "connect", "static", "rip", "ripng", "ospf",
"ospf6", "isis", "bgp", "hsls"
{ Value, "Distance", Range(0,255) }
},
- ["olsrd_secure.so.0.5"] = {
+ ["olsrd_secure"] = {
{ Value, "Keyfile", "/etc/private-olsr.key" }
},
- ["olsrd_txtinfo.so.0.1"] = {
+ ["olsrd_txtinfo"] = {
{ Value, "accept", "::1/128" }
},
- ["olsrd_jsoninfo.so.0.0"] = {
+ ["olsrd_jsoninfo"] = {
{ Value, "accept", "::1/128" },
{ Value, "port", "9090" },
{ Value, "UUIDFile", "/etc/olsrd/olsrd.uuid.ipv6" },
},
- ["olsrd_watchdog.so.0.1"] = {
+ ["olsrd_watchdog"] = {
{ Value, "file", "/var/run/olsrd.watchdog.ipv6" },
{ Value, "interval", "30" }
},
- ["olsrd_mdns.so.1.0.0"] = {
+ ["olsrd_mdns.so"] = {
{ DynamicList, "NonOlsrIf", "lan" }
},
- ["olsrd_p2pd.so.0.1.0"] = {
+ ["olsrd_p2pd.so"] = {
{ DynamicList, "NonOlsrIf", "lan" },
{ Value, "P2pdTtl", "10" }
},
- ["olsrd_arprefresh.so.0.1"] = {},
- ["olsrd_dot_draw.so.0.3"] = {},
- ["olsrd_dyn_gw_plain.so.0.4"] = {},
- ["olsrd_pgraph.so.1.1"] = {},
- ["olsrd_tas.so.0.1"] = {}
+ ["olsrd_arprefresh"] = {},
+ ["olsrd_dot_draw"] = {},
+ ["olsrd_dyn_gw_plain"] = {},
+ ["olsrd_pgraph"] = {},
+ ["olsrd_tas"] = {}
}
-- txtinfo v6 & olsrd nameservice
uci:foreach("olsrd", "LoadPlugin",
function(s)
- if s.library == "olsrd_txtinfo.so.0.1" then
+ if s.library == "olsrd_txtinfo" then
uci:set("olsrd", s['.name'], "accept", "::1")
- elseif s.library == "olsrd_nameservice.so.0.3" then
+ elseif s.library == "olsrd_nameservice" then
uci:set("olsrd", s['.name'], "name", hostname)
end
end)
while value="$( uci -q get $config.@LoadPlugin[$i].library )"; do {
case "$value" in
- 'olsrd_nameservice.so.'*)
+ 'olsrd_nameservice'*)
file="$( uci -q get $config.@LoadPlugin[$i].hosts_file )"
break
;;
x:foreach("olsrd", "LoadPlugin",
function(s)
- if s.library == "olsrd_watchdog.so.0.1" then
+ if s.library == "olsrd_watchdog" then
intv = tonumber(s.interval)
stamp = s.file
end
[ -z "$MAPSERVER" ] && logger -t "freifunk-mapupdate:" "No mapserver configured" && exit 1
#check if nameservice plugin is installed and enabled, else exit
-nslib=`uci show olsrd |grep olsrd_nameservice.so |awk {' FS="."; print $1"."$2 '}`
+nslib=`uci show olsrd |grep olsrd_nameservice |awk {' FS="."; print $1"."$2 '}`
if [ -n "$nslib" ]; then
LATLONFILE="$(uci -q get $nslib.latlon_file)"
if [ -z "$LATLONFILE" ]; then
uci batch <<- EOF
set $cfg.olsrd_nameservice=LoadPlugin
- set $cfg.olsrd_nameservice.library="olsrd_nameservice.so.0.4"
+ set $cfg.olsrd_nameservice.library="olsrd_nameservice"
set $cfg.olsrd_nameservice.latlon_file="$llfile"
set $cfg.olsrd_nameservice.hosts_file="$hosts"
set $cfg.olsrd_nameservice.sighup_pid_file="/var/run/dnsmasq.pid"
if [ "$general_sharenet" == 1 ]; then
uci set $cfg.dyngw_plain=LoadPlugin
uci set $cfg.dyngw_plain.ignore=0
- uci set $cfg.dyngw_plain.library="olsrd_dyn_gw_plain.so.0.4"
+ uci set $cfg.dyngw_plain.library="olsrd_dyn_gw_plain"
uci_commitverbose "Setup olsrd_dyngw_plain plugin" $cfg
fi
uci batch <<- EOF
set $cfg.olsrd_watchdog=LoadPlugin
- set $cfg.olsrd_watchdog.library="olsrd_watchdog.so.0.1"
+ set $cfg.olsrd_watchdog.library="olsrd_watchdog"
set $cfg.olsrd_watchdog.file="$watchdogfile"
set $cfg.olsrd_watchdog.interval=30
EOF
proto="$1"
uci batch <<- EOF
set $cfg.olsrd_jsoninfo=LoadPlugin
- set $cfg.olsrd_jsoninfo.library="olsrd_jsoninfo.so.1.1"
+ set $cfg.olsrd_jsoninfo.library="olsrd_jsoninfo"
EOF
if [ "$proto" = "6" ]; then
uci set $cfg.olsrd_jsoninfo.ipv6only='1'
proto="$1"
uci batch <<- EOF
set $cfg.olsrd_txtinfo=LoadPlugin
- set $cfg.olsrd_txtinfo.library="olsrd_txtinfo.so.1.1"
+ set $cfg.olsrd_txtinfo.library="olsrd_txtinfo"
EOF
if [ "$proto" = "6" ]; then
uci set $cfg.olsrd_txtinfo.ipv6only='1'
local has_latlon = false
local uci = require "luci.model.uci".cursor()
uci:foreach("olsrd", "LoadPlugin", function(s)
- if s.library == "olsrd_nameservice.so.0.3" and s.latlon_file then
+ if s.library == "olsrd_nameservice" and s.latlon_file then
has_latlon = true
end
end)
local uci = require "luci.model.uci".cursor()
uci:foreach("olsrd", "LoadPlugin", function(s)
- if s.library == "olsrd_nameservice.so.0.3" and s.latlon_file then
+ if s.library == "olsrd_nameservice" and s.latlon_file then
fd = io.open(s.latlon_file)
end
end)