From 02d18da7bb9b6196a8d47204d950916a4ab83578 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 30 Jul 2021 20:21:24 +0200 Subject: [PATCH] Create device via wizard, need more work --- .../luasrc/controller/openmptcprouter.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index cca82d950..1f04b4b88 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -292,12 +292,24 @@ function wizard_add() ucic:set("network",intf,"masterintf",masterintf) elseif typeintf == "" and ifname ~= "" and (proto == "static" or proto == "dhcp" or proto == "dhcpv6") then ucic:set("network",intf,"device",ifname) + ucic:set("network",intf .. "_dev","device") + ucic:set("network",intf .. "_dev","name",ifname) elseif typeintf == "" and device ~= "" and proto == "ncm" then ucic:set("network",intf,"device",device_ncm) + ucic:set("network",intf .. "_dev","device") + ucic:set("network",intf .. "_dev","name",device_ncm) elseif typeintf == "" and device ~= "" and proto == "qmi" then ucic:set("network",intf,"device",device_qmi) + ucic:set("network",intf .. "_dev","device") + ucic:set("network",intf .. "_dev","name",device_qmi) elseif typeintf == "" and device ~= "" and proto == "modemmanager" then ucic:set("network",intf,"device",device_manager) + ucic:set("network",intf .. "_dev","device") + ucic:set("network",intf .. "_dev","name",device_manager) + elseif typeintf == "" and ifname ~= "" and proto == "static" then + ucic:set("network",intf,"device",ifname) + ucic:set("network",intf .. "_dev","device") + ucic:set("network",intf .. "_dev","name",ifname) end if proto == "pppoe" then ucic:set("network",intf,"pppd_options","persist maxfail 0")