mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user