From 442300794ec0f43b77f2d4ea7b8864a0189f968a Mon Sep 17 00:00:00 2001 From: Brett Stauner Date: Tue, 9 Jul 2013 15:47:49 -0500 Subject: [PATCH] Support Fedora when it was "Fedora Core" The version_number regex was causing an error because my /etc/redhat-release looks like this: Fedora Core release 6 (Zod) This fix allowed initialize to run just fine on my ridiculously old release. --- plugins/hosts/fedora/host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hosts/fedora/host.rb b/plugins/hosts/fedora/host.rb index a61298877..40b1ca33d 100644 --- a/plugins/hosts/fedora/host.rb +++ b/plugins/hosts/fedora/host.rb @@ -34,7 +34,7 @@ module VagrantPlugins release_file = Pathname.new("/etc/redhat-release") begin release_file.open("r") do |f| - version_number = /Fedora release ([0-9]+)/.match(f.gets)[1].to_i + version_number = /Fedora.*release ([0-9]+)/.match(f.gets)[1].to_i if version_number >= 16 # "service nfs-server" will redirect properly to systemctl # when "service nfs-server restart" is called.