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:
parent
e5ce19ff11
commit
7d0a92c5b4
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue