From 9b383740ba82a4ffa28a7d8e21326bbf2e8151c0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 12 Jan 2014 22:37:39 -0800 Subject: [PATCH] hosts/bsd: use Util::Which instead of system("which") --- plugins/hosts/bsd/cap/nfs.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/hosts/bsd/cap/nfs.rb b/plugins/hosts/bsd/cap/nfs.rb index 34b4a90b3..bf9e9a341 100644 --- a/plugins/hosts/bsd/cap/nfs.rb +++ b/plugins/hosts/bsd/cap/nfs.rb @@ -2,13 +2,12 @@ require "log4r" require "vagrant/util" require "vagrant/util/shell_quote" +require "vagrant/util/which" module VagrantPlugins module HostBSD module Cap class NFS - extend Vagrant::Util::Retryable - def self.nfs_export(environment, ui, id, ips, folders) nfs_exports_template = environment.host.capability(:nfs_exports_template) nfs_restart_command = environment.host.capability(:nfs_restart_command) @@ -117,9 +116,7 @@ module VagrantPlugins end def self.nfs_installed(environment) - retryable(:tries => 10, :on => TypeError) do - system("which nfsd > /dev/null 2>&1") - end + !!Vagrant::Util::Which.which("nfsd") end def self.nfs_prune(environment, ui, valid_ids)