reload connection instead of restart

This commit is contained in:
linyows 2015-05-14 12:53:23 +09:00
parent c1c39beaab
commit 421fab17a2
2 changed files with 1 additions and 3 deletions

View File

@ -85,6 +85,7 @@ module VagrantPlugins
interfaces.each do |interface|
retryable(on: Vagrant::Errors::VagrantError, tries: 3, sleep: 2) do
machine.communicate.sudo("cat /tmp/vagrant-network-entry_#{interface} >> #{network_scripts_dir}/ifcfg-#{interface}")
machine.communicate.sudo("which nmcli >/dev/null 2>&1 && nmcli c reload #{interface}")
machine.communicate.sudo("/sbin/ifdown #{interface}", error_check: true)
machine.communicate.sudo("/sbin/ifup #{interface}")
end

View File

@ -26,9 +26,6 @@ module VagrantPlugins
require File.expand_path("../../../fedora/cap/configure_networks", __FILE__)
::VagrantPlugins::GuestFedora::Cap::ConfigureNetworks.
configure_networks(machine, networks)
machine.communicate.sudo("systemctl restart NetworkManager")
machine.communicate.sudo("systemctl restart network")
end
def self.configure_networks_default(machine, networks)