Merge pull request #5320 from epicagency/master

providers/virtualbox: support Regexp usage for bridge configuration
This commit is contained in:
Mitchell Hashimoto 2015-02-24 09:43:36 -08:00
commit d399bdae8f
1 changed files with 3 additions and 1 deletions

View File

@ -157,8 +157,10 @@ module VagrantPlugins
@logger.debug("Bridge was directly specified in config, searching for: #{config[:bridge]}")
# Search for a matching bridged interface
bridge = config[:bridge]
bridge = bridge.downcase if bridge.respond_to?(:downcase)
bridgedifs.each do |interface|
if interface[:name].downcase == config[:bridge].downcase
if bridge === interface[:name].downcase
@logger.debug("Specific bridge found as configured in the Vagrantfile. Using it.")
chosen_bridge = interface[:name]
break