Skip to content
Snippets Groups Projects
Unverified Commit 9e4d8ad4 authored by David Bauer's avatar David Bauer Committed by GitHub
Browse files

gluon-core: preserve interface MAC-address configuration (#3102)


This preserves configuration of MAC-addresses for each interface in case
OpenWrt sets them using netifd.

This is done by preserving all device-configuration which does not
define a bridge or the MAC-address of a bridge.

Closes #3100

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
parent 19976e26
No related branches found
No related tags found
No related merge requests found
......@@ -90,8 +90,15 @@ else
sysconfig.single_ifname = lan_ifname or wan_ifname
end
-- Delete all UCI device sections of type 'bridge'
-- as well as the ones starting with 'br-'.
-- Preserve all others to apply MAC address stored in UCI
uci:foreach('network', 'device',function(s)
if s.type == 'bridge' or s.name:match('^br-') then
uci:delete('network', s['.name'])
end
end)
uci:delete_all('network', 'device')
uci:delete_all('network', 'interface')
uci:save('network')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment