Update host.rb
Vagrant has been failing to run on CentOS 6 since version 1.2.5. The read of file /etc/redhat-release appeared to be only checking for the word Fedora. Altered the regex to match CentOS as well
This commit is contained in:
parent
a2925f0ff5
commit
2a9d0c9d7f
|
@ -36,7 +36,7 @@ module VagrantPlugins
|
||||||
release_file = Pathname.new("/etc/redhat-release")
|
release_file = Pathname.new("/etc/redhat-release")
|
||||||
begin
|
begin
|
||||||
release_file.open("r") do |f|
|
release_file.open("r") do |f|
|
||||||
version_number = /Fedora.*release ([0-9]+)/.match(f.gets)[1].to_i
|
version_number = /[CentOS|Fedora].*release ([0-9]+)/.match(f.gets)[1].to_i
|
||||||
if version_number >= 16
|
if version_number >= 16
|
||||||
# "service nfs-server" will redirect properly to systemctl
|
# "service nfs-server" will redirect properly to systemctl
|
||||||
# when "service nfs-server restart" is called.
|
# when "service nfs-server restart" is called.
|
||||||
|
|
Loading…
Reference in New Issue