autocore: sync with upstream source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
8e06858f10
commit
99552e0a31
@ -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")
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user