Skip to content

Commit

Permalink
Merge pull request hashicorp#5931 from kaorimatz/fix/guests-fedra-nmcli
Browse files Browse the repository at this point in the history
guests/fedora: don't fail if nmcli doesn't exist on the guest
  • Loading branch information
mitchellh committed Jul 13, 2015
2 parents 639f22c + 73d5718 commit a9d5d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/guests/fedora/cap/configure_networks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def self.configure_networks(machine, networks)
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
Expand Down

0 comments on commit a9d5d6a

Please sign in to comment.