mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix on label
This commit is contained in:
parent
3b1b376f00
commit
388c131f96
2 changed files with 9 additions and 1 deletions
|
@ -196,6 +196,12 @@ function wizard_add()
|
||||||
ucic:delete("qos",intf)
|
ucic:delete("qos",intf)
|
||||||
ucic:save("qos")
|
ucic:save("qos")
|
||||||
ucic:commit("qos")
|
ucic:commit("qos")
|
||||||
|
ucic:delete("openmptcprouter",intf)
|
||||||
|
ucic:save("openmptcprouter")
|
||||||
|
ucic:commit("openmptcprouter")
|
||||||
|
ucic:delete("macvlan",intf)
|
||||||
|
ucic:save("macvlan")
|
||||||
|
ucic:commit("macvlan")
|
||||||
if defif ~= nil and defif ~= "" then
|
if defif ~= nil and defif ~= "" then
|
||||||
luci.sys.call("uci -q del_list vnstat.@vnstat[-1].interface=" .. defif)
|
luci.sys.call("uci -q del_list vnstat.@vnstat[-1].interface=" .. defif)
|
||||||
end
|
end
|
||||||
|
@ -209,6 +215,7 @@ function wizard_add()
|
||||||
-- Set interfaces settings
|
-- Set interfaces settings
|
||||||
local interfaces = luci.http.formvaluetable("intf")
|
local interfaces = luci.http.formvaluetable("intf")
|
||||||
for intf, _ in pairs(interfaces) do
|
for intf, _ in pairs(interfaces) do
|
||||||
|
local label = luci.http.formvalue("cbid.network.%s.label" % intf) or ""
|
||||||
local proto = luci.http.formvalue("cbid.network.%s.proto" % intf) or "static"
|
local proto = luci.http.formvalue("cbid.network.%s.proto" % intf) or "static"
|
||||||
local ipaddr = luci.http.formvalue("cbid.network.%s.ipaddr" % intf) or ""
|
local ipaddr = luci.http.formvalue("cbid.network.%s.ipaddr" % intf) or ""
|
||||||
local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or ""
|
local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or ""
|
||||||
|
@ -217,6 +224,7 @@ function wizard_add()
|
||||||
if proto ~= "other" then
|
if proto ~= "other" then
|
||||||
ucic:set("network",intf,"proto",proto)
|
ucic:set("network",intf,"proto",proto)
|
||||||
end
|
end
|
||||||
|
ucic:set("network",intf,"label",label)
|
||||||
ucic:set("network",intf,"ipaddr",ipaddr)
|
ucic:set("network",intf,"ipaddr",ipaddr)
|
||||||
ucic:set("network",intf,"netmask",netmask)
|
ucic:set("network",intf,"netmask",netmask)
|
||||||
ucic:set("network",intf,"gateway",gateway)
|
ucic:set("network",intf,"gateway",gateway)
|
||||||
|
|
|
@ -1374,7 +1374,7 @@ local methods = {
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
defaultvpn = {
|
defaultvpn = {
|
||||||
args = { vpn = "glorytun-tcp" },
|
args = { vpn = "glorytun_tcp" },
|
||||||
call = function(args)
|
call = function(args)
|
||||||
default_vpn(args.vpn)
|
default_vpn(args.vpn)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue