Merge pull request #766 from Achimh3011/master

openSuSE as host system
This commit is contained in:
Mitchell Hashimoto 2012-02-28 09:26:31 -08:00
commit 7035f5720e
3 changed files with 32 additions and 0 deletions

View File

@ -165,6 +165,7 @@ Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig }
Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch } Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD } Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora } Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
Vagrant.hosts.register(:opensuse) { Vagrant::Hosts::OpenSUSE }
Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD } Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
Vagrant.hosts.register(:gentoo) { Vagrant::Hosts::Gentoo } Vagrant.hosts.register(:gentoo) { Vagrant::Hosts::Gentoo }
Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux } Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }

View File

@ -7,6 +7,7 @@ module Vagrant
autoload :BSD, 'vagrant/hosts/bsd' autoload :BSD, 'vagrant/hosts/bsd'
autoload :FreeBSD, 'vagrant/hosts/freebsd' autoload :FreeBSD, 'vagrant/hosts/freebsd'
autoload :Fedora, 'vagrant/hosts/fedora' autoload :Fedora, 'vagrant/hosts/fedora'
autoload :OpenSUSE, 'vagrant/hosts/opensuse'
autoload :Gentoo, 'vagrant/hosts/gentoo' autoload :Gentoo, 'vagrant/hosts/gentoo'
autoload :Linux, 'vagrant/hosts/linux' autoload :Linux, 'vagrant/hosts/linux'
autoload :Windows, 'vagrant/hosts/windows' autoload :Windows, 'vagrant/hosts/windows'

View File

@ -0,0 +1,30 @@
require 'pathname'
module Vagrant
module Hosts
class OpenSUSE < Linux
def self.match?
release_file = Pathname.new("/etc/SuSE-release")
if release_file.exist?
release_file.open("r") do |f|
return true if f.gets =~ /^openSUSE/
end
end
false
end
# Normal, mid-range precedence.
def self.precedence
5
end
def initialize(*args)
super
@nfs_server_binary = "/etc/init.d/nfsserver"
end
end
end
end