autocore: sync with upstream source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-01-24 16:41:33 +08:00
parent 8e06858f10
commit 99552e0a31
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 12 additions and 4 deletions

View File

@ -165,7 +165,11 @@ local methods = {
local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r")
local rv = {}
if ok then
if not (ok and fd) then
ok, fd = pcall(io.open, "/usr/share/firewall4/helpers", "r")
end
if ok and fd then
local entry
while true do
@ -209,7 +213,7 @@ local methods = {
rv.firewall = fs.access("/sbin/fw3")
rv.firewall4 = fs.access("/sbin/fw4")
rv.opkg = fs.access("/bin/opkg")
rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt")
rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") or fs.access("/sys/module/nft_flow_offload/refcnt")
rv.br2684ctl = fs.access("/usr/sbin/br2684ctl")
rv.swconfig = fs.access("/sbin/swconfig")
rv.odhcpd = fs.access("/usr/sbin/odhcpd")

View File

@ -165,7 +165,11 @@ local methods = {
local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r")
local rv = {}
if ok then
if not (ok and fd) then
ok, fd = pcall(io.open, "/usr/share/firewall4/helpers", "r")
end
if ok and fd then
local entry
while true do
@ -209,7 +213,7 @@ local methods = {
rv.firewall = fs.access("/sbin/fw3")
rv.firewall4 = fs.access("/sbin/fw4")
rv.opkg = fs.access("/bin/opkg")
rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt")
rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") or fs.access("/sys/module/nft_flow_offload/refcnt")
rv.br2684ctl = fs.access("/usr/sbin/br2684ctl")
rv.swconfig = fs.access("/sbin/swconfig")
rv.odhcpd = fs.access("/usr/sbin/odhcpd")