From 19b640b53b0ba8585b91a5f5fa23503e0fca76c2 Mon Sep 17 00:00:00 2001 From: pmelange Date: Mon, 5 Nov 2018 10:24:15 +0100 Subject: [PATCH] luci-app-olsr: cbi remove library version numbers in library search results Signed-off-by: pmelange --- .../luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua | 1 + .../luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua | 1 + 2 files changed, 2 insertions(+) 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, -- 2.25.1