From d4df42934a426a2acec628fa2f5507c07d765ebc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 6 Feb 2021 08:56:44 +0100 Subject: [PATCH 1/2] Fix display when device have a . --- .../luasrc/view/openmptcprouter/wizard.htm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 8ddce55b0..5224df408 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -558,8 +558,13 @@ <% iffind=0 uciifname=uci:get("network",ifname,"ifname") - realifname=splitstring(uciifname,'.')[1] or "" - vlan=splitstring(uciifname,'.')[2] or "" + if uciifname:match("/") then + realifname=uciifname + vlan="" + else + realifname=splitstring(uciifname,'.')[1] or "" + vlan=splitstring(uciifname,'.')[2] or "" + end for _, ifacea in ipairs(ifaces) do if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then %> From dc66b82252eceb11ad5be31739ded6f46feb99a9 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 6 Feb 2021 09:05:02 +0100 Subject: [PATCH 2/2] Fix issue with modemmanager in wizard --- .../luasrc/view/openmptcprouter/wizard.htm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 5224df408..ba31c9dd7 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -22,6 +22,9 @@ return true end function splitstring(inputstr, sep) + if inputstr == nil then + return "" + end if sep == nil then sep = "%s" end