Darwin: code debug cleanup

This commit is contained in:
Timothy Sutton 2013-08-06 10:18:38 -04:00
parent 8b925e6c15
commit a3b9428f67
1 changed files with 3 additions and 9 deletions

View File

@ -33,20 +33,14 @@ module VagrantPlugins
devlist << devmap devlist << devmap
end end
end end
puts devlist
File.delete(tmpints) File.delete(tmpints)
networks.each do |network| networks.each do |network|
intnum = network[:interface] service_name = devlist[network[:interface]][:service]
puts network[:interface]
puts network[:type]
if network[:type].to_sym == :static 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 \"#{service_name}\" #{network[:ip]} #{network[:netmask]}"
command = "networksetup -setmanual \"#{devlist[intnum][:service]}\" #{network[:ip]} #{network[:netmask]}"
elsif network[:type].to_sym == :dhcp elsif network[:type].to_sym == :dhcp
command = "networksetup -setdhcp \"#{devlist[intnum][:service]}\"" command = "networksetup -setdhcp \"#{service_name}\""
end end
machine.communicate.sudo(command) machine.communicate.sudo(command)