Remove the +1 offset, I resolved the issue with the 'phantom' en1

interface. For some reason interfaces still skip en1, but provided we
enumerate based on order and not name, things should work smoothly.
This commit is contained in:
Brian Johnson 2013-08-05 18:45:42 -07:00
parent e5ce19ff11
commit 7d0a92c5b4
1 changed files with 2 additions and 2 deletions

View File

@ -41,10 +41,10 @@ module VagrantPlugins
puts network[:type]
if network[:type].to_sym == :static
# network seems 1 indexed - skip NAT interface (en0) also en1 because it seems to not *really* exist on virtualbox?
command = "networksetup -setmanual \"#{devlist[intnum+1][:service]}\" #{network[:ip]} #{network[:netmask]}"
command = "networksetup -setmanual \"#{devlist[intnum][:service]}\" #{network[:ip]} #{network[:netmask]}"
elsif network[:type].to_sym == :dhcp
command = "networksetup -setdhcp \"#{devlist[intnum+1][:service]}\""
command = "networksetup -setdhcp \"#{devlist[intnum][:service]}\""
end