mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 14:13:30 +00:00
luci-app-flowoffload: get rid of grep (#671)
This commit is contained in:
parent
f3eb9e531f
commit
430c82625a
@ -13,15 +13,15 @@ function index()
|
||||
end
|
||||
|
||||
local function is_running()
|
||||
return luci.sys.call("iptables --list | grep FLOWOFFLOAD >/dev/null") == 0
|
||||
return luci.sys.call("[ `cat /sys/module/xt_FLOWOFFLOAD/refcnt 2>/dev/null` -gt 0 ] 2>/dev/null") == 0
|
||||
end
|
||||
|
||||
local function is_bbr()
|
||||
return luci.sys.call("sysctl net.ipv4.tcp_congestion_control | grep bbr >/dev/null") == 0
|
||||
return luci.sys.call("[ `cat /proc/sys/net/ipv4/tcp_congestion_control 2>/dev/null` = bbr ] 2>/dev/null") == 0
|
||||
end
|
||||
|
||||
local function is_fullcone()
|
||||
return luci.sys.call("iptables -t nat -L -n --line-numbers | grep FULLCONENAT >/dev/null") == 0
|
||||
return luci.sys.call("[ `cat /sys/module/xt_FULLCONENAT/refcnt 2>/dev/null` -gt 0 ] 2>/dev/null") == 0
|
||||
end
|
||||
|
||||
local function is_dns()
|
||||
|
Loading…
Reference in New Issue
Block a user