get rid of library version numbers in luci olsrd code 2250/head
authorPhilipp Borgers <borgers@mi.fu-berlin.de>
Thu, 25 Oct 2018 19:54:42 +0000 (21:54 +0200)
committerPhilipp Borgers <borgers@mi.fu-berlin.de>
Thu, 25 Oct 2018 19:56:06 +0000 (21:56 +0200)
Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua
applications/luci-app-siitwizard/luasrc/model/cbi/siitwizard.lua
contrib/package/freifunk-common/files/usr/bin/neigh.sh
contrib/package/freifunk-common/files/usr/sbin/ff_olsr_watchdog
contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh
modules/luci-mod-freifunk/luasrc/view/freifunk-map/frame.htm
modules/luci-mod-freifunk/luasrc/view/freifunk-map/map.htm

index 94f01cb51c63f5c9bdac73ec8cb4afce1b1f56c6..91624f3b30fe0c853c2e3e8e17ab19af8926e42e 100644 (file)
@@ -16,7 +16,7 @@ local uci = require "luci.model.uci".cursor()
 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
index 43d6a08ad1f7ac3841cf01088f23f53d2fed35e7..2d7cffe6e9f729dca45d14951518956a6a3bea55 100644 (file)
@@ -62,7 +62,7 @@ if arg[1] then
 
 
        local knownPlParams = {
-               ["olsrd_bmf.so.1.5.3"] = {
+               ["olsrd_bmf"] = {
                        { Value,        "BmfInterface",                 "bmf0" },
                        { Value,        "BmfInterfaceIp",               "10.10.10.234/24" },
                        { Flag,         "DoLocalBroadcast",             "no" },
@@ -73,19 +73,19 @@ if arg[1] then
                        { 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" },
@@ -109,7 +109,7 @@ if arg[1] then
                        { 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"
@@ -119,40 +119,40 @@ if arg[1] then
                        { 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"]                   = {}
        }
 
 
index d1c68be24b7d5565fd53c64e5118f7bc6ef03228..12fa0a171e5d60e0234afe89af5a2aff43c891cb 100644 (file)
@@ -62,7 +62,7 @@ if arg[1] then
 
 
        local knownPlParams = {
-               ["olsrd_bmf.so.1.5.3"] = {
+               ["olsrd_bmf"] = {
                        { Value,        "BmfInterface",                 "bmf0" },
                        { Value,        "BmfInterfaceIp",               "10.10.10.234/24" },
                        { Flag,         "DoLocalBroadcast",             "no" },
@@ -73,19 +73,19 @@ if arg[1] then
                        { 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" },
@@ -109,7 +109,7 @@ if arg[1] then
                        { 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"
@@ -119,40 +119,40 @@ if arg[1] then
                        { 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"]                   = {}
        }
 
 
index 413b3b481ff8fb38bc9dfcbe35d9f212b7868abc..f3501e5d724b5b338136f6ce2d2470005a4b5a05 100644 (file)
@@ -342,9 +342,9 @@ function mode.write(self, section, value)
        -- 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)
index 468ed7a3e07b532725b78ead574336f525ceeb33..82589ecfdf1727ef942e86dd7ba2f55ce95c0f7a 100755 (executable)
@@ -10,7 +10,7 @@ hostsfile_getname()
 
        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
                        ;;
index 8ac803d309c09d9e2d438c77b83757bc18e4d834..af1d7ca68d1f5119432f6b736799a6c186a201a1 100755 (executable)
@@ -11,7 +11,7 @@ if fs.access("/var/run/olsrd.pid") or fs.access("/var/run/olsrd4.pid") then
 
        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
index 40a077f154cb2fcadcaedbc43a67fa120e36ba2c..b06e145d65ea06802b600fec7d067d503a5cd065 100755 (executable)
@@ -8,7 +8,7 @@ MAPSERVER="$(uci -q get freifunk-mapupdate.mapupdate.mapserver)"
 [ -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
index 9ebcb46b134ca9330a0b98e61e574fb679c53858..a435e4b1b8a582f3f30af593b6afa49992d891b4 100755 (executable)
@@ -73,7 +73,7 @@ setup_nameservice() {
 
        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"
@@ -91,7 +91,7 @@ setup_dyngw_plain() {
     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
 
@@ -106,7 +106,7 @@ setup_watchdog() {
 
        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
@@ -118,7 +118,7 @@ setup_jsoninfo() {
        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'
@@ -130,7 +130,7 @@ setup_txtinfo() {
        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'
index dbf3820f5c17821431c240578b2e59db0c7a0875..bd936ac705ae69d6bb614877a9a17b98eb6c5e2d 100644 (file)
@@ -4,7 +4,7 @@
        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)
index c3951f9c63d35f7014f23be80451cc99fe6b926f..f69401d6e35669b532a88a1ecda1d3a38161533d 100644 (file)
@@ -85,7 +85,7 @@
                                        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)