hosts/linux: niceer error if rdesktop not found

This commit is contained in:
Mitchell Hashimoto 2014-05-20 19:58:12 -07:00
parent 2da21e3578
commit f369c13e25
3 changed files with 14 additions and 0 deletions

View File

@ -396,6 +396,10 @@ module Vagrant
error_key(:linux_nfs_mount_failed) error_key(:linux_nfs_mount_failed)
end end
class LinuxRDesktopNotFound < VagrantError
error_key(:linux_rdesktop_not_found)
end
class LocalDataDirectoryNotAccessible < VagrantError class LocalDataDirectoryNotAccessible < VagrantError
error_key(:local_data_dir_not_accessible) error_key(:local_data_dir_not_accessible)
end end

View File

@ -1,8 +1,14 @@
require "vagrant/util/which"
module VagrantPlugins module VagrantPlugins
module HostLinux module HostLinux
module Cap module Cap
class RDP class RDP
def self.rdp_client(env, rdp_info) def self.rdp_client(env, rdp_info)
if !Vagrant::Util::Which.which("rdesktop")
raise Vagrant::Errors::LinuxRDesktopNotFound
end
args = [] args = []
args << "-u" << rdp_info[:username] args << "-u" << rdp_info[:username]
args << "-p" << rdp_info[:password] if rdp_info[:password] args << "-p" << rdp_info[:password] if rdp_info[:password]

View File

@ -756,6 +756,10 @@ en:
that the NFS client software is properly installed, and consult any resources that the NFS client software is properly installed, and consult any resources
specific to the linux distro you're using for more information on how to specific to the linux distro you're using for more information on how to
do this. do this.
linux_rdesktop_not_found: |-
The `rdesktop` application was not found. Vagrant requires this
in order to connect via RDP to the Vagrant environment. Please ensure
this application is installed and available on the path and try again.
machine_action_locked: |- machine_action_locked: |-
An action '%{action}' was attempted on the machine '%{name}', An action '%{action}' was attempted on the machine '%{name}',
but another process is already executing an action on the machine. but another process is already executing an action on the machine.