Dont support this feature on devices with switch chips.

This commit is contained in:
Tim Wilkinson 2022-04-16 21:34:57 -07:00 committed by Joe AE6XE
parent 7b77f111ce
commit 4f1b13deb6
1 changed files with 7 additions and 0 deletions

View File

@ -216,6 +216,7 @@ local settings = {
type = "string",
desc = "Specify WAN interface VLAN #. MUST be entered as ethX.YY where X is the interface (usually '0') and YY is the VLAN # to use.",
default = "",
condition = "supportsVLANChange()",
postcallback = "postChangeWANVLAN()",
needreboot = true
},
@ -360,6 +361,12 @@ function hasUSB()
return aredn.hardware.has_usb()
end
function supportsVLANChange()
-- We dont currently support VLAN changes on devices with switch chips
local stat = nixio.fs.stat("/etc/aredn_include/swconfig")
return not (stat and stat.size > 0)
end
-- callbacks
local newval