mirror of https://github.com/aredn/aredn.git
Dont support this feature on devices with switch chips.
This commit is contained in:
parent
7b77f111ce
commit
4f1b13deb6
|
@ -216,6 +216,7 @@ local settings = {
|
||||||
type = "string",
|
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.",
|
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 = "",
|
default = "",
|
||||||
|
condition = "supportsVLANChange()",
|
||||||
postcallback = "postChangeWANVLAN()",
|
postcallback = "postChangeWANVLAN()",
|
||||||
needreboot = true
|
needreboot = true
|
||||||
},
|
},
|
||||||
|
@ -360,6 +361,12 @@ function hasUSB()
|
||||||
return aredn.hardware.has_usb()
|
return aredn.hardware.has_usb()
|
||||||
end
|
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
|
-- callbacks
|
||||||
|
|
||||||
local newval
|
local newval
|
||||||
|
|
Loading…
Reference in New Issue