luci-mod-admin-full: prevent unknown sysctl key warnings on status page
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
e386d76d57
commit
e6cfe35baf
1 changed files with 3 additions and 4 deletions
|
@ -40,10 +40,9 @@
|
||||||
local conn_count = tonumber(
|
local conn_count = tonumber(
|
||||||
fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count") or "") or 0
|
fs.readfile("/proc/sys/net/netfilter/nf_conntrack_count") or "") or 0
|
||||||
|
|
||||||
local conn_max = tonumber((
|
local conn_max = tonumber(luci.sys.exec(
|
||||||
luci.sys.exec("sysctl net.nf_conntrack_max") or
|
"sysctl -n -e net.nf_conntrack_max net.ipv4.netfilter.ip_conntrack_max"
|
||||||
luci.sys.exec("sysctl net.ipv4.netfilter.ip_conntrack_max") or
|
):match("%d+")) or 4096
|
||||||
""):match("%d+")) or 4096
|
|
||||||
|
|
||||||
local rv = {
|
local rv = {
|
||||||
uptime = sysinfo.uptime or 0,
|
uptime = sysinfo.uptime or 0,
|
||||||
|
|
Loading…
Reference in a new issue