Fixes issue of vagrant not assigned requested IP address. This was due to the switchover of the network interfaces to ethX format.

This commit is contained in:
Andrew W. Buchanan 2014-10-02 15:35:23 -04:00
parent 66e07f935a
commit 110fcd0eda

View File

@ -117,7 +117,7 @@ module VagrantPlugins
def self.match_by_name(machine) def self.match_by_name(machine)
match = {} match = {}
machine.communicate.tap do |comm| machine.communicate.tap do |comm|
comm.sudo("ifconfig -a | grep ^en | cut -f1 -d:") do |_, result| comm.sudo("ifconfig -a | grep '^en\\|^eth' | cut -f1 -d:") do |_, result|
result.split("\n").each_with_index do |name, interface| result.split("\n").each_with_index do |name, interface|
match[interface] = "Name=#{name}" match[interface] = "Name=#{name}"
end end