Merge pull request #3749 from Ansuel/fix_relayd

luci-base: fix error 404 on missing relay protocol
This commit is contained in:
Jo-Philipp Wich 2020-04-08 09:15:38 +02:00 committed by GitHub
commit e331e32b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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);

View file

@ -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" }