Commit ab08902c authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Allow matching version numbers with more than one digit, e.g. 3.0.11

parent 312b822b
......@@ -7,7 +7,7 @@ end
Facter.add(:freeradius_version) do
setcode do
if !version.nil?
minver = version.split(/\n/)[0].match(/FreeRADIUS Version (\d\.\d\.\d)/)[1].to_s
minver = version.split(/\n/)[0].match(/FreeRADIUS Version (\d+\.\d+\.\d+)/)[1].to_s
end
minver
end
......@@ -16,7 +16,7 @@ end
Facter.add(:freeradius_maj_version) do
setcode do
if !version.nil?
majver = version.split(/\n/)[0].match(/FreeRADIUS Version (\d)\.\d\.\d/)[1].to_s
majver = version.split(/\n/)[0].match(/FreeRADIUS Version (\d+)\.\d+\.\d+/)[1].to_s
end
majver
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment