diff options
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/sys.lua | 2 | ||||
-rwxr-xr-x | modules/luci-base/root/usr/libexec/rpcd/luci | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua index aa00766fb8..af345a16d5 100644 --- a/modules/luci-base/luasrc/sys.lua +++ b/modules/luci-base/luasrc/sys.lua @@ -566,6 +566,7 @@ function init.names() end function init.index(name) + name = fs.basename(name) if fs.access(init.dir..name) then return call("env -i sh -c 'source %s%s enabled; exit ${START:-255}' >/dev/null" %{ init.dir, name }) @@ -573,6 +574,7 @@ function init.index(name) end local function init_action(action, name) + name = fs.basename(name) if fs.access(init.dir..name) then return call("env -i %s%s %s >/dev/null" %{ init.dir, name, action }) end diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index fbfc3c7a59..dccdbee900 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -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") |