Merge pull request #900 from abuchanan920/network-config-fix

Fixes issue of vagrant not assigned requested IP address.
This commit is contained in:
Michael Marineau 2014-10-02 22:02:24 -07:00
commit 5ab02e5b4c

View File

@ -117,7 +117,7 @@ module VagrantPlugins
def self.match_by_name(machine)
match = {}
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|
match[interface] = "Name=#{name}"
end