Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
puppet-freeradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projets publics
puppet-freeradius
Commits
ba3ccd00
Commit
ba3ccd00
authored
May 27, 2016
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
Fix version number lookup on Ubuntu
parent
380ae1b1
Branches
Branches containing commit
Tags
6.2.2
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/facter/freeradius_version.rb
+15
-3
15 additions, 3 deletions
lib/facter/freeradius_version.rb
with
15 additions
and
3 deletions
lib/facter/freeradius_version.rb
+
15
−
3
View file @
ba3ccd00
# Grab the FreeRADIUS version from the output of radiusd -v
version
=
Facter
::
Core
::
Execution
.
exec
(
'radiusd -v'
)
if
version
.
nil?
version
=
Facter
::
Core
::
Execution
.
exec
(
'freeradius -v'
)
# Set path to binary for our platform
dist
=
Facter
.
value
(
:osfamily
)
case
dist
when
/RedHat/
binary
=
'radiusd'
when
/Debian/
binary
=
'freeradius'
else
binary
=
'radiusd'
end
# Execute call to fetch version info
version
=
Facter
::
Core
::
Execution
.
exec
(
"
#{
binary
}
-v"
)
# Extract full version number
Facter
.
add
(
:freeradius_version
)
do
setcode
do
if
!
version
.
nil?
...
...
@@ -13,6 +24,7 @@ Facter.add(:freeradius_version) do
end
end
# Extract major version number
Facter
.
add
(
:freeradius_maj_version
)
do
setcode
do
if
!
version
.
nil?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment