diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb index 02c220bb192..e0f66df8678 100644 --- a/lib/puppet/provider/service/init.rb +++ b/lib/puppet/provider/service/init.rb @@ -19,12 +19,9 @@ def self.defpath end # Debian and Ubuntu should use the Debian provider. + confine :false => ['Debian', 'Ubuntu'].include?(Puppet.runtime[:facter].value('operatingsystem')) # RedHat systems should use the RedHat provider. - confine :true => begin - os = Puppet.runtime[:facter].value(:operatingsystem).downcase - family = Puppet.runtime[:facter].value(:osfamily).downcase - !(os == 'debian' || os == 'ubuntu' || family == 'redhat') - end + confine :false => Puppet.runtime[:facter].value('osfamily') == 'RedHat' # We can't confine this here, because the init path can be overridden. #confine :exists => defpath