summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-08 09:15:38 +0200
committerGitHub <noreply@github.com>2020-04-08 09:15:38 +0200
commite331e32b2cd28f98ada2a7c4134ea0b77b9558f0 (patch)
tree148759ac7a5de2f58d5fd0d4f015ea31125a7f5e /modules/luci-base
parentadf0fb1879ffb6bd04984d257484fad0fba1d6a3 (diff)
parent3d70d3e5d786383b8754200cf065713b191bdead (diff)
Merge pull request #3749 from Ansuel/fix_relayd
luci-base: fix error 404 on missing relay protocol
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js2
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci1
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js
index 0cd4f29bc4..bca67849b4 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -108,7 +108,7 @@ function getProtocolHandlers(cache) {
Object.assign(protos, { none: { no_device: false } });
/* Hack: emulate relayd protocol */
- if (!protos.hasOwnProperty('relay'))
+ if (!protos.hasOwnProperty('relay') && L.hasSystemFeature('relayd'))
Object.assign(protos, { relay: { no_device: true } });
Object.assign(_protospecs, protos);
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index c2be3e92b3..35b85d43d0 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -217,6 +217,7 @@ local methods = {
rv.ipv6 = fs.access("/proc/net/ipv6_route")
rv.dropbear = fs.access("/usr/sbin/dropbear")
rv.cabundle = fs.access("/etc/ssl/certs/ca-certificates.crt")
+ rv.relayd = fs.access("/usr/sbin/relayd")
local wifi_features = { "eap", "11n", "11ac", "11r", "11w", "acs", "sae", "owe", "suiteb192" }