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>
Thu, 6 Dec 2018 18:05:39 +0000 (19:05 +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 43d6a08ad1f7ac3841cf01088f23f53d2fed35e7..4a57ee21aa72dbd9eab1e0dce8a639572b7fa8bc 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 d1c68be24b7d5565fd53c64e5118f7bc6ef03228..4b6d7a6a4cceb20266dde82b900c9cc249f5ce75 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,