diff --git a/CHANGELOG.md b/CHANGELOG.md index 47c704c7b..ab27ded21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ BUG FIXES: - command/docker-run: Synced folders will be attached properly. [GH-3873] - command/rsync: Sync to Docker containers properly. [GH-4066] - guests/darwin: Hostname sets bonjour name and local host name. [GH-4535] + - guests/freebsd: NFS mounting can specify the version. [GH-4518] - guests/linux: More descriptive error message if SMB mount fails. [GH-4641] - guests/rhel: Hostname setting on 7.x series works properly. [GH-4527] - guests/solaris11: Static IP address preserved after restart. [GH-4621] diff --git a/plugins/guests/freebsd/cap/mount_nfs_folder.rb b/plugins/guests/freebsd/cap/mount_nfs_folder.rb index 0741c954b..a008ec3f4 100644 --- a/plugins/guests/freebsd/cap/mount_nfs_folder.rb +++ b/plugins/guests/freebsd/cap/mount_nfs_folder.rb @@ -6,8 +6,11 @@ module VagrantPlugins folders.each do |name, opts| if opts[:nfs_version] nfs_version_mount_option="-o nfsv#{opts[:nfs_version]}" - end - machine.communicate.sudo("mount -t nfs #{nfs_version_mount_option} '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'", {shell: "sh"}) + end + + machine.communicate.sudo( + "mount -t nfs #{nfs_version_mount_option} " + + "'#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'", {shell: "sh"}) end end end