From f1d5fe27ab831eb5f0fdeabd37434ae3d0b0b8e8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 13 Jan 2012 20:38:20 -0800 Subject: [PATCH] Check for /etc/exports before pruning --- lib/vagrant/hosts/bsd.rb | 2 ++ lib/vagrant/hosts/linux.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/vagrant/hosts/bsd.rb b/lib/vagrant/hosts/bsd.rb index 7e1326408..4a13ef51b 100644 --- a/lib/vagrant/hosts/bsd.rb +++ b/lib/vagrant/hosts/bsd.rb @@ -58,6 +58,8 @@ module Vagrant end def nfs_prune(valid_ids) + return if !File.exist?("/etc/exports") + @logger.info("Pruning invalid NFS entries...") output = false diff --git a/lib/vagrant/hosts/linux.rb b/lib/vagrant/hosts/linux.rb index 5b03db77b..c179fd1d4 100644 --- a/lib/vagrant/hosts/linux.rb +++ b/lib/vagrant/hosts/linux.rb @@ -56,6 +56,8 @@ module Vagrant end def nfs_prune(valid_ids) + return if !File.exist?("/etc/exports") + @logger.info("Pruning invalid NFS entries...") output = false