Merge pull request #5931 from kaorimatz/fix/guests-fedra-nmcli

guests/fedora: don't fail if nmcli doesn't exist on the guest
This commit is contained in:
Mitchell Hashimoto 2015-07-13 08:31:01 -07:00
commit a9d5d6ae4a
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,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("! 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