Commit 8c7e6214 authored by Jonathan's avatar Jonathan
Browse files

Merge pull request #29 from davidc/master

Look for executable 'freeradius' where 'radiusd' doesn't exist
parents 00d4297c 2c48c3b3
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
Facter.add(:freeradius_maj_version) do Facter.add(:freeradius_maj_version) do
setcode do setcode do
version = Facter::Core::Execution.exec('radiusd -v') version = Facter::Core::Execution.exec('radiusd -v')
if version.nil?
version = Facter::Core::Execution.exec('freeradius -v')
end
if !version.nil? if !version.nil?
version = version.split(/\n/)[0].match(/FreeRADIUS Version (\d)\.\d\.\d/)[1].to_s version = version.split(/\n/)[0].match(/FreeRADIUS Version (\d)\.\d\.\d/)[1].to_s
end end
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
Facter.add(:freeradius_version) do Facter.add(:freeradius_version) do
setcode do setcode do
version = Facter::Core::Execution.exec('radiusd -v') version = Facter::Core::Execution.exec('radiusd -v')
if version.nil?
version = Facter::Core::Execution.exec('freeradius -v')
end
if !version.nil? if !version.nil?
version = version.split(/\n/)[0].match(/FreeRADIUS Version (\d\.\d\.\d)/)[1].to_s version = version.split(/\n/)[0].match(/FreeRADIUS Version (\d\.\d\.\d)/)[1].to_s
end 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