From: pmelange Date: Mon, 5 Nov 2018 09:24:15 +0000 (+0100) Subject: luci-app-olsr: cbi remove library version numbers in library search results X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=19b640b53b0ba8585b91a5f5fa23503e0fca76c2;p=oweals%2Fluci.git luci-app-olsr: cbi remove library version numbers in library search results Signed-off-by: pmelange --- diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua index 2d7cffe6e..59e99c867 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua @@ -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, diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua index 12fa0a171..9873b0269 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua @@ -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,