Merge pull request #4619 from dlundgren/master
Don't update the NFS exports file [GH-4148]
This commit is contained in:
commit
fb5aefe41e
|
@ -69,20 +69,23 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Export the folders. We do this with a class-wide lock because
|
# Update the exports when there are actually exports [GH-4148]
|
||||||
# NFS exporting often requires sudo privilege and we don't want
|
if !export_folders.empty?
|
||||||
# overlapping input requests. [GH-2680]
|
# Export the folders. We do this with a class-wide lock because
|
||||||
@@lock.synchronize do
|
# NFS exporting often requires sudo privilege and we don't want
|
||||||
begin
|
# overlapping input requests. [GH-2680]
|
||||||
machine.env.lock("nfs-export") do
|
@@lock.synchronize do
|
||||||
machine.ui.info I18n.t("vagrant.actions.vm.nfs.exporting")
|
begin
|
||||||
machine.env.host.capability(
|
machine.env.lock("nfs-export") do
|
||||||
:nfs_export,
|
machine.ui.info I18n.t("vagrant.actions.vm.nfs.exporting")
|
||||||
machine.ui, machine.id, machine_ip, export_folders)
|
machine.env.host.capability(
|
||||||
|
:nfs_export,
|
||||||
|
machine.ui, machine.id, machine_ip, export_folders)
|
||||||
|
end
|
||||||
|
rescue Vagrant::Errors::EnvironmentLockedError
|
||||||
|
sleep 1
|
||||||
|
retry
|
||||||
end
|
end
|
||||||
rescue Vagrant::Errors::EnvironmentLockedError
|
|
||||||
sleep 1
|
|
||||||
retry
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue