diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb index a28c4b8e523..67579beee1a 100644 --- a/lib/puppet/provider/service/init.rb +++ b/lib/puppet/provider/service/init.rb @@ -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