hosts/linux: rdp_client cap [GH-3845]

This commit is contained in:
Mitchell Hashimoto 2014-05-20 19:55:36 -07:00
parent 3eb3931231
commit 2da21e3578
3 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,7 @@ FEATURES:
IMPROVEMENTS:
- commands/halt: Halt in reverse order of up, like destroy. [GH-3790]
- hosts/linux: Uses rdesktop to RDP into machines if available. [GH-3845]
BUG FIXES:

View File

@ -0,0 +1,17 @@
module VagrantPlugins
module HostLinux
module Cap
class RDP
def self.rdp_client(env, rdp_info)
args = []
args << "-u" << rdp_info[:username]
args << "-p" << rdp_info[:password] if rdp_info[:password]
args += rdp_info[:extra_args] if rdp_info[:extra_args]
args << "#{rdp_info[:host]}:#{rdp_info[:port]}"
Vagrant::Util::Subprocess.execute("rdesktop", *args)
end
end
end
end
end

View File

@ -26,6 +26,11 @@ module VagrantPlugins
Cap::NFS
end
host_capability("linux", "rdp_client") do
require_relative "cap/rdp"
Cap::RDP
end
# Linux-specific helpers we need to determine paths that can
# be overriden.
host_capability("linux", "nfs_apply_command") do