luci-app-olsr: cbi remove library version numbers in library search results
authorpmelange <isprotejesvalkata@gmail.com>
Mon, 5 Nov 2018 09:24:15 +0000 (10:24 +0100)
committerpmelange <isprotejesvalkata@gmail.com>
Wed, 7 Nov 2018 17:41:58 +0000 (18:41 +0100)
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua
applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua

index 2d7cffe6e9f729dca45d14951518956a6a3bea55..59e99c867fff3e76993c8f07f1d8a2e60789d546 100644 (file)
@@ -227,6 +227,7 @@ else
        -- create a loadplugin section for each found plugin
        for v in fs.dir("/usr/lib") do
                if v:sub(1, 6) == "olsrd_" then
+                       v = string.match(v, "^(olsrd.*)%.so%..*")
                        if not plugins[v] then
                                mpi.uci:section(
                                        "olsrd", "LoadPlugin", nil,
index 12fa0a171e5d60e0234afe89af5a2aff43c891cb..9873b0269a3ee00ae3bcdfbbedaa538e207377dd 100644 (file)
@@ -227,6 +227,7 @@ else
        -- create a loadplugin section for each found plugin
        for v in fs.dir("/usr/lib") do
                if v:sub(1, 6) == "olsrd_" then
+                       v=string.match(v, "^(olsrd_.*)%.so%..*")
                        if not plugins[v] then
                                mpi.uci:section(
                                        "olsrd6", "LoadPlugin", nil,