Do not remove system bridge virbr0

This commit is contained in:
Michael Stucki 2015-08-25 14:36:59 +02:00
parent eb503e42fd
commit 40ced9d3d1
2 changed files with 3 additions and 3 deletions

View file

@ -35,8 +35,8 @@ module Vagrant
if ! driver.bridge_is_in_use?(bridge) if ! driver.bridge_is_in_use?(bridge)
env[:ui].info I18n.t("vagrant_lxc.messages.remove_bridge", name: bridge) env[:ui].info I18n.t("vagrant_lxc.messages.remove_bridge", name: bridge)
if bridge != "lxcbr0" unless ['lxcbr0', 'virbr0'].include? bridge
driver.remove_bridge(bridge) driver.remove_bridge(bridge)
end end
end end
end end

View file

@ -172,7 +172,7 @@ module Vagrant
end end
def remove_bridge(bridge_name) def remove_bridge(bridge_name)
if bridge_name == "lxcbr0" if ['lxcbr0', 'virbr0'].include? bridge_name
@logger.info "Skipping removal system bridge #{bridge_name}" @logger.info "Skipping removal system bridge #{bridge_name}"
return return
end end