Merge pull request #2090 from miguno/GH-2087

plugins/hosts/fedora: support RHEL
This commit is contained in:
Mitchell Hashimoto 2013-08-28 16:24:49 -07:00
commit 1a210e2c29
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ module VagrantPlugins
contents = f.gets
return true if contents =~ /^Fedora/
return true if contents =~ /^CentOS/
return true if contents =~ /^Red Hat Enterprise Linux Server/
end
end
@ -36,7 +37,7 @@ module VagrantPlugins
release_file = Pathname.new("/etc/redhat-release")
begin
release_file.open("r") do |f|
version_number = /(CentOS|Fedora).*release ([0-9]+)/.match(f.gets)[1].to_i
version_number = /(CentOS|Fedora|Red Hat Enterprise Linux Server).*release ([0-9]+)/.match(f.gets)[2].to_i
if version_number >= 16
# "service nfs-server" will redirect properly to systemctl
# when "service nfs-server restart" is called.