Windows host

This commit is contained in:
Mitchell Hashimoto 2012-01-08 11:14:01 -08:00
parent 8d32002c02
commit ba5cd9b88a
3 changed files with 27 additions and 9 deletions

View File

@ -137,10 +137,11 @@ Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig }
# Register the built-in hosts
Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
Vagrant.hosts.register(:windows) { Vagrant::Hosts::Windows }
# Register the built-in guests
Vagrant.guests.register(:arch) { Vagrant::Guest::Arch }

View File

@ -1,11 +1,12 @@
module Vagrant
module Hosts
autoload :Base, 'vagrant/hosts/base'
autoload :Arch, 'vagrant/hosts/arch'
autoload :BSD, 'vagrant/hosts/bsd'
autoload :FreeBSD,'vagrant/hosts/freebsd'
autoload :Fedora, 'vagrant/hosts/fedora'
autoload :Linux, 'vagrant/hosts/linux'
autoload :Base, 'vagrant/hosts/base'
autoload :Arch, 'vagrant/hosts/arch'
autoload :BSD, 'vagrant/hosts/bsd'
autoload :FreeBSD, 'vagrant/hosts/freebsd'
autoload :Fedora, 'vagrant/hosts/fedora'
autoload :Linux, 'vagrant/hosts/linux'
autoload :Windows, 'vagrant/hosts/windows'
# This method detects the correct host based on the `match?` methods
# implemented in the registered hosts.

View File

@ -0,0 +1,16 @@
require 'vagrant/util/platform'
module Vagrant
module Hosts
class Windows < Base
def self.match?
Util::Platform.windows?
end
# Windows does not support NFS
def nfs?
false
end
end
end
end