From 73d5718da3efc3f1f6e34756916234b773c36385 Mon Sep 17 00:00:00 2001 From: Satoshi Matsumoto Date: Sat, 11 Jul 2015 15:56:20 +0900 Subject: [PATCH] guests/fedora: don't fail if nmcli doesn't exist on the guest --- plugins/guests/fedora/cap/configure_networks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/fedora/cap/configure_networks.rb b/plugins/guests/fedora/cap/configure_networks.rb index 0e2a0d057..963996edc 100644 --- a/plugins/guests/fedora/cap/configure_networks.rb +++ b/plugins/guests/fedora/cap/configure_networks.rb @@ -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