TOS 6.0+ Consider creating named bridge for br-lan in initial configuration
Summary
Initial network config after the first boot includes definition of LAN bridge as anonymous section.
It would be nice if we could have named section for LAN bridge from the beginning - it is easier to work with it from foris-controller.
Details
Initial network config after the first boot includes definition of LAN bridge as anonymous section.
/etc/config/network
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
But after passing through guide there will be two definitions for br-lan
bridge:
config device <--- initial config
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
[...]
config device 'br_lan' <--- br-lan #2
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
This is because migration from TOS 5.x to TOS 6.0+ should make transition from one expected configuration to another expected configuration.
I.e. there shouldn't be any discrepancies in configuration and therefore it shouldn't be needed to check /etc/config/network
that carefully afterwards.
However this assumption works fine only in case of migration from TOS 5.x to TOS 6.0+.
On the other hand, on clean install from medkit, there will eventually be two configuration sections for the same bridge.
So we could:
- (a) Either create the initial configuration the way we want it to be (i.e. the proposal in summary)
- (b) Or adjust foris-controller to check for any conflicting config section on every update.