From bcfd7cf05ab2aac06513f48b7a5c042fad8002c8 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 43d6a08ad1..4a57ee21aa 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 d1c68be24b..4b6d7a6a4c 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.30.2