Skip to content

Commit

Permalink
Merge pull request #9082 from ekohl/avoid-downcase
Browse files Browse the repository at this point in the history
Avoid downcasing facts in service provider
  • Loading branch information
joshcooper authored Nov 15, 2023
2 parents 682d101 + 283d1bf commit 7ca202b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/puppet/provider/service/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ def self.defpath
end

# Debian and Ubuntu should use the Debian provider.
confine :false => ['Debian', 'Ubuntu'].include?(Puppet.runtime[:facter].value('os.name'))
# RedHat systems should use the RedHat provider.
confine :true => begin
os = Puppet.runtime[:facter].value('os.name').downcase
family = Puppet.runtime[:facter].value('os.family').downcase
!(os == 'debian' || os == 'ubuntu' || family == 'redhat')
end
confine :false => Puppet.runtime[:facter].value('os.family') == 'RedHat'

# We can't confine this here, because the init path can be overridden.
#confine :exists => defpath
Expand Down

0 comments on commit 7ca202b

Please sign in to comment.