mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix when iface not defined
This commit is contained in:
parent
943f1de544
commit
e5874cc492
1 changed files with 5 additions and 3 deletions
|
@ -1092,9 +1092,11 @@ function interfaces_status()
|
|||
end
|
||||
end
|
||||
|
||||
local mtu = ut.trim(sys.exec("cat /sys/class/net/" .. ifname .. "/mtu | tr -d '\n'"))
|
||||
if mtu == "" and ifname ~= nil then
|
||||
mtu = uci:get("openmptcprouter",interface,"mtu") or ""
|
||||
if ifname ~= nil then
|
||||
local mtu = ut.trim(sys.exec("cat /sys/class/net/" .. ifname .. "/mtu | tr -d '\n'"))
|
||||
if mtu == "" and ifname ~= nil then
|
||||
mtu = uci:get("openmptcprouter",interface,"mtu") or ""
|
||||
end
|
||||
end
|
||||
|
||||
local data = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue