# File lib/puppet/provider/service/debian.rb, line 29 29: def enabled? 30: # TODO: Replace system() call when Puppet::Util.execute gives us a way 31: # to determine exit status. http://projects.reductivelabs.com/issues/2538 32: system("/usr/sbin/invoke-rc.d", "--query", @resource[:name], "start") 33: 34: # 104 is the exit status when you query start an enabled service. 35: # 106 is the exit status when the policy layer supplies a fallback action 36: # See x-man-page://invoke-rc.d 37: if [104, 106].include?($?.exitstatus) 38: return :true 39: else 40: return :false 41: end 42: end