Ensure host-only interface is down before reconfiguring it.

This commit is contained in:
Mike Williams 2010-10-16 22:18:05 +11:00 committed by Mitchell Hashimoto
parent 9a254937fc
commit 3f358f5df6
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ module Vagrant
vm.ssh.upload!(StringIO.new(entry), "/tmp/vagrant-network-entry")
vm.ssh.execute do |ssh|
ssh.exec!("sudo /sbin/ifdown eth#{net_options[:adapter]} 2> /dev/null")
ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /etc/network/interfaces'")
ssh.exec!("sudo /sbin/ifup eth#{net_options[:adapter]}")
end