hosts/bsd: nice error if can't read exports file [GH-2038]

This commit is contained in:
Mitchell Hashimoto 2013-09-01 10:25:00 -07:00
parent 4608e75b48
commit c63d4fd6b8
4 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@ BUG FIXES:
- guests/arch: use systemd way of setting host names. [GH-2041]
- guests/debian: Force bring up eth0. Fixes hangs on setting hostname.
[GH-2026]
- hosts/bsd: Nicer error if can't read NFS exports. [GH-2038]
- hosts/fedora: properly detect later CentOS versions. [GH-2008]
- providers/virtualbox: VirtualBox 4.2 now supports up to 36
network adapters. [GH-1886]

View File

@ -335,6 +335,10 @@ module Vagrant
error_key(:not_found, "vagrant.actions.vm.host_only_network")
end
class NFSCantReadExports < VagrantError
error_key(:nfs_cant_read_exports)
end
class NFSNoGuestIP < VagrantError
error_key(:nfs_no_guest_ip)
end

View File

@ -129,6 +129,8 @@ module VagrantPlugins
end
end
end
rescue Errno::EACCES
raise Vagrant::Errors::NFSCantReadExports
end
protected

View File

@ -365,6 +365,10 @@ en:
A multi-vm environment is required for name specification to this command.
multi_vm_target_required: |-
This command requires a specific VM name to target in a multi-VM environment.
nfs_cant_read_exports: |-
Vagrant can't read your current NFS exports! The exports file should be
readable by any user. This is usually caused by invalid permissions
on your NFS exports file. Please fix them and try again.
nfs_no_guest_ip: |-
No guest IP was given to the Vagrant core NFS helper. This is an
internal error that should be reported as a bug.