virtualbox: only configure networks if there are some [GH-1796]

This commit is contained in:
Mitchell Hashimoto 2013-06-09 13:37:15 -07:00
parent 16139dc435
commit 3d1332c86f
2 changed files with 7 additions and 2 deletions

View File

@ -20,6 +20,9 @@ IMPROVEMENTS:
as well as V2 configuration.
- Add `ARPCHECK=0` to RedHat OS family network configuration. [GH-1815]
- Add SSH agent forwarding sample to initial Vagrantfile. [GH-1808]
- VirtualBox: Only configure networks if there are any to configure.
This allows linux's that don't implement this capability to work with
Vagrant. [GH-1796]
BUG FIXES:

View File

@ -111,8 +111,10 @@ module VagrantPlugins
# Only configure the networks the user requested us to configure
networks_to_configure = networks.select { |n| n[:auto_config] }
env[:ui].info I18n.t("vagrant.actions.vm.network.configuring")
env[:machine].guest.capability(:configure_networks, networks_to_configure)
if !networks_to_configure.empty?
env[:ui].info I18n.t("vagrant.actions.vm.network.configuring")
env[:machine].guest.capability(:configure_networks, networks_to_configure)
end
end
end