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 94f01cb..91624f3 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 43d6a08..2d7cffe 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 d1c68be..12fa0a1 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 413b3b4..f3501e5 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 468ed7a..82589ec 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 8ac803d..af1d7ca 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 40a077f..b06e145 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 9ebcb46..a435e4b 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 dbf3820..bd936ac 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 c3951f9..f69401d 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)