commit
7035f5720e
|
@ -165,6 +165,7 @@ Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig }
|
|||
Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch }
|
||||
Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD }
|
||||
Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora }
|
||||
Vagrant.hosts.register(:opensuse) { Vagrant::Hosts::OpenSUSE }
|
||||
Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD }
|
||||
Vagrant.hosts.register(:gentoo) { Vagrant::Hosts::Gentoo }
|
||||
Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux }
|
||||
|
|
|
@ -7,6 +7,7 @@ module Vagrant
|
|||
autoload :BSD, 'vagrant/hosts/bsd'
|
||||
autoload :FreeBSD, 'vagrant/hosts/freebsd'
|
||||
autoload :Fedora, 'vagrant/hosts/fedora'
|
||||
autoload :OpenSUSE, 'vagrant/hosts/opensuse'
|
||||
autoload :Gentoo, 'vagrant/hosts/gentoo'
|
||||
autoload :Linux, 'vagrant/hosts/linux'
|
||||
autoload :Windows, 'vagrant/hosts/windows'
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue