From d80f32c20f9f7d0ecd63eff7eb28ce055d57897d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 6 Dec 2013 16:42:34 -0800 Subject: [PATCH] synced_folders/nfs: allow plugins to provide valid NFS ids --- plugins/synced_folders/nfs/synced_folder.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/synced_folders/nfs/synced_folder.rb b/plugins/synced_folders/nfs/synced_folder.rb index be969d50c..d74fce9e1 100644 --- a/plugins/synced_folders/nfs/synced_folder.rb +++ b/plugins/synced_folders/nfs/synced_folder.rb @@ -52,9 +52,12 @@ module VagrantPlugins end def cleanup(machine, opts) - # Get the ID of all active machines. - ids = machine.env.active_machines.map do |name, provider| - machine.env.machine(name, provider).id + ids = opts[:nfs_valid_ids] + if !ids + # Get the ID of all active machines. + ids = machine.env.active_machines.map do |name, provider| + machine.env.machine(name, provider).id + end end # Prune any of the unused machines