gluon-core: delete all network device sections (#2263)
Delete all default network device sections upon first boot. Only LAN & WAN networks are defined at this point. We are using the legacy way of definiting bridges via the interface sections ifname option. The prior filtering was based upon a single device and didn't take into consideration that DSA interface names can be named arbitrarily. Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
parent
73b0128468
commit
5ec8676b28
@ -79,9 +79,7 @@ uci:delete('network', 'lan')
|
|||||||
uci:delete('network', 'wan')
|
uci:delete('network', 'wan')
|
||||||
|
|
||||||
uci:foreach('network', 'device', function(dev)
|
uci:foreach('network', 'device', function(dev)
|
||||||
if dev['type'] ~= 'bridge' then return end
|
-- Delete all default OpenWrt network device sections.
|
||||||
if dev['ifname'] ~= 'lan' and dev['ifname'] ~= 'wan' then return end
|
|
||||||
|
|
||||||
uci:delete('network', dev['.name'])
|
uci:delete('network', dev['.name'])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user