gluon-core: use copy of "WAN" role list for "single" default

Instead of using roles.wan directly as the default for roles.single,
create a copy of the table, so subsequent modifications of roles.single
don't affect roles.wan as well.

Fixes migration of Mesh-on-WAN status when no default for "single"
interfaces is set in site.conf.
This commit is contained in:
Matthias Schiffer 2022-04-14 17:50:37 +02:00
parent 4225bd3853
commit c1a1035fe3
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -10,7 +10,7 @@ local roles = {
lan = site.interfaces.lan.default_roles({'client'}),
wan = site.interfaces.wan.default_roles({'uplink'}),
}
roles.single = site.interfaces.single.default_roles(roles.wan)
roles.single = site.interfaces.single.default_roles({unpack(roles.wan)})
-- Migration of Mesh-on-WAN/LAN setting from Gluon 2021.1 and older (to be removed in 2024)
--