2012-04-19 05:20:45 +00:00
|
|
|
require "pathname"
|
2012-02-28 10:55:39 +00:00
|
|
|
|
2012-05-23 23:03:14 +00:00
|
|
|
require "vagrant"
|
|
|
|
|
|
|
|
require Vagrant.source_root.join("plugins/hosts/linux/host")
|
|
|
|
|
2012-04-19 05:20:45 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module HostOpenSUSE
|
|
|
|
class Host < VagrantPlugins::HostLinux::Host
|
2012-02-28 10:55:39 +00:00
|
|
|
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
|
|
|
|
|
2013-08-24 10:37:09 +00:00
|
|
|
@nfs_apply_command = "/usr/sbin/exportfs -r"
|
|
|
|
@nfs_check_command = "service nfsserver status"
|
|
|
|
@nfs_start_command = "service nfsserver start"
|
2012-02-28 10:55:39 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|