diff --git a/lib/vagrant/hosts/bsd.rb b/lib/vagrant/hosts/bsd.rb index d3c7e2825..2c555f11d 100644 --- a/lib/vagrant/hosts/bsd.rb +++ b/lib/vagrant/hosts/bsd.rb @@ -21,6 +21,10 @@ module Vagrant # though its executed in multiple subshells. system(%Q[sudo su root -c "echo '#{line}' >> /etc/exports"]) end + + # We run restart here instead of "update" just in case nfsd + # is not starting + system("sudo nfsd restart") end end end diff --git a/test/vagrant/hosts/bsd_test.rb b/test/vagrant/hosts/bsd_test.rb index 36e624fa0..ccb39134b 100644 --- a/test/vagrant/hosts/bsd_test.rb +++ b/test/vagrant/hosts/bsd_test.rb @@ -30,6 +30,7 @@ class BSDHostTest < Test::Unit::TestCase :folders => @folders).returns(output) @instance.expects(:system).times(output.split("\n").length) + @instance.expects(:system).with("sudo nfsd restart") @instance.nfs_export(@ip, @folders) end end