Skip to content

Commit d5a4b2a

Browse files
authored
Merge pull request #9147 from ekohl/7.x-avoid-downcase
[7.x] Avoid downcasing facts in service provider
2 parents 1145d44 + d231c60 commit d5a4b2a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/puppet/provider/service/init.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ def self.defpath
1919
end
2020

2121
# Debian and Ubuntu should use the Debian provider.
22+
confine :false => ['Debian', 'Ubuntu'].include?(Puppet.runtime[:facter].value('operatingsystem'))
2223
# RedHat systems should use the RedHat provider.
23-
confine :true => begin
24-
os = Puppet.runtime[:facter].value(:operatingsystem).downcase
25-
family = Puppet.runtime[:facter].value(:osfamily).downcase
26-
!(os == 'debian' || os == 'ubuntu' || family == 'redhat')
27-
end
24+
confine :false => Puppet.runtime[:facter].value('osfamily') == 'RedHat'
2825

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

0 commit comments

Comments
 (0)