Skip to content

Commit

Permalink
gluon-core: delete all network device sections (#2263)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
blocktrron authored Jul 13, 2021
1 parent 73b0128 commit 5ec8676
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions package/gluon-core/luasrc/lib/gluon/upgrade/020-interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ uci:delete('network', 'lan')
uci:delete('network', 'wan')

uci:foreach('network', 'device', function(dev)
if dev['type'] ~= 'bridge' then return end
if dev['ifname'] ~= 'lan' and dev['ifname'] ~= 'wan' then return end

-- Delete all default OpenWrt network device sections.
uci:delete('network', dev['.name'])
end)

Expand Down

0 comments on commit 5ec8676

Please sign in to comment.