Networks come back up properly after reboot on RedHat [GH-921]
This commit is contained in:
parent
fd157476b4
commit
78d4d0a790
|
@ -68,6 +68,7 @@ BUG FIXES:
|
|||
since they can be quite large and were messing with tmpfs. [GH-1442]
|
||||
- Fix issue parsing extra SSH args in `vagrant ssh` in multi-machine
|
||||
environments. [GH-1545]
|
||||
- Networks come back up properly on RedHat systems after reboot. [GH-921]
|
||||
|
||||
## 1.1.6 (April 3, 2013)
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
require "set"
|
||||
require "tempfile"
|
||||
|
||||
require "vagrant/util/retryable"
|
||||
require "vagrant/util/template_renderer"
|
||||
|
||||
module VagrantPlugins
|
||||
module GuestRedHat
|
||||
module Cap
|
||||
class ConfigureNetworks
|
||||
extend Vagrant::Util::Retryable
|
||||
include Vagrant::Util
|
||||
|
||||
def self.configure_networks(machine, networks)
|
||||
|
@ -43,11 +45,14 @@ module VagrantPlugins
|
|||
# each specifically, we avoid reconfiguring eth0 (the NAT interface) so
|
||||
# SSH never dies.
|
||||
interfaces.each do |interface|
|
||||
retryable(:on => Vagrant::Errors::VagrantError, :tries => 3, :sleep => 2) do
|
||||
machine.communicate.sudo("/sbin/ifdown eth#{interface} 2> /dev/null", :error_check => false)
|
||||
machine.communicate.sudo("cat /tmp/vagrant-network-entry_#{interface} >> #{network_scripts_dir}/ifcfg-eth#{interface}")
|
||||
machine.communicate.sudo("rm /tmp/vagrant-network-entry_#{interface}")
|
||||
machine.communicate.sudo("/sbin/ifup eth#{interface} 2> /dev/null")
|
||||
end
|
||||
|
||||
machine.communicate.sudo("rm /tmp/vagrant-network-entry_#{interface}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue