1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus 2018-09-19 09:19:12 +02:00
parent 8bc5f10a20
commit 1061d8f263

View file

@ -37,7 +37,12 @@ function multipath_bandwidth()
if dev ~= "lo" and dev ~= "" then if dev ~= "lo" and dev ~= "" then
local multipath = s["multipath"] or "off" local multipath = s["multipath"] or "off"
if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then
result[dev] = "[" .. string.gsub((luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev)), '[\r\n]', '') .. "]" local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or ""
if bwc ~= nil then
result[dev] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]"
else
result[dev] = "[]"
end
end end
end end
end) end)