Restart NFSd after exporting

This commit is contained in:
Mitchell Hashimoto 2010-07-12 22:37:24 -07:00
parent 5e537f7126
commit ba78ea86c1
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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