local num_ports = 5
local cpu_port = 5
+ local enable_vlan4k = false
+
-- Parse some common switch properties from swconfig help output.
local swc = io.popen("swconfig dev %q help 2>/dev/null" % switch_name)
if swc then
if is_vlan_attr then has_vlan4k = line:match(": (%w+)") end
if is_port_attr then has_ptpvid = line:match(": (%w+)") end
+ elseif line:match(": enable_vlan4k") then
+ enable_vlan4k = true
+
end
end
s:option(Flag, "enable_vlan", translate("Enable VLAN functionality"))
.cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end
+ if enable_vlan4k then
+ s:option(Flag, "enable_vlan4k", translate("Enable 4K VLANs"))
+ end
+
s:option(Flag, "reset", translate("Reset switch during setup"))
.cfgvalue = function(self, section) return Flag.cfgvalue(self, section) or self.enabled end