Use ifdown instead of ifconfig down for Ubuntu/Debian

This commit is contained in:
Mitchell Hashimoto 2012-01-19 17:36:29 -08:00
parent 0d455fcf73
commit 9b4925d5de
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,8 @@
- Log output now goes on `stderr`, since it is utility information.
- Get rid of case where a `NoMethodError` could be raised while
determining VirtualBox version. [GH-658]
- Debian/Ubuntu uses `ifdown` again, instead of `ifconfig xxx down`, since
the behavior seems different/wrong.
## 0.9.1 (January 18, 2012)

View File

@ -38,7 +38,7 @@ module Vagrant
# each specifically, we avoid reconfiguring eth0 (the NAT interface) so
# SSH never dies.
interfaces.each do |interface|
vm.channel.sudo("/sbin/ifconfig eth#{interface} down 2> /dev/null")
vm.channel.sudo("/sbin/ifdown eth#{interface} 2> /dev/null")
end
vm.channel.sudo("cat /tmp/vagrant-network-entry >> /etc/network/interfaces")