Skip to content
Snippets Groups Projects
Unverified Commit 2d28a9d9 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

Merge pull request #3107 from blocktrron/device-delete-all

gluon-core: use delete_all instead of iterated delete
parents dc841ea4 2dfa8b8d
No related branches found
No related tags found
No related merge requests found
......@@ -93,10 +93,8 @@ 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
uci:delete_all('network', 'device', function(dev)
return (dev.type == 'bridge' or dev.name:match('^br-'))
end)
uci:delete_all('network', 'interface')
......
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