diff options
| author | champtar <champetier.etienne@gmail.com> | 2017-12-11 11:43:46 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-11 11:43:46 -0800 |
| commit | 8eb10fd28fadf683d2c3019de5255c55572e0be9 (patch) | |
| tree | ac435b069ffd1268c1f44f279cd7530616354338 | |
| parent | a915753aaac76c85ddd5d52439f7458177d7df7b (diff) | |
| parent | 78acfcc7ed0696cc2e0f83cb493c59e30af29247 (diff) | |
Merge pull request #5012 from TDT-AG/20171025-luci-app-mwan3-fix-iface_state
net/mwan3-luci: fix iface_state on on status page for 17.01
| -rw-r--r-- | net/mwan3-luci/Makefile | 2 | ||||
| -rw-r--r-- | net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/net/mwan3-luci/Makefile b/net/mwan3-luci/Makefile index 8c77394da..fa2a24409 100644 --- a/net/mwan3-luci/Makefile +++ b/net/mwan3-luci/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mwan3 PKG_VERSION:=1.4 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_MAINTAINER:=Aedan Renner <chipdankly@gmail.com> PKG_LICENSE:=GPLv2 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua b/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua index 3d5a23dd0..bec0e6b27 100644 --- a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua +++ b/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua @@ -65,7 +65,8 @@ end function getInterfaceStatus(ruleNumber, interfaceName) if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".enabled")) == "1" then - if ut.trim(sys.exec(ip .. "route list table " .. ruleNumber)) ~= "" then + local fs = require "nixio.fs" + if fs.readfile("/var/run/mwan3/iface_state/%s" % interfaceName) == "online" then if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".track_ip")) ~= "" then return "online" else |
