# File lib/puppet/provider/service/gentoo.rb, line 29 29: def enabled? 30: begin 31: output = update :show 32: rescue Puppet::ExecutionFailure 33: return :false 34: end 35: 36: line = output.split(/\n/).find { |l| l.include?(@resource[:name]) } 37: 38: return :false unless line 39: 40: # If it's enabled then it will print output showing service | runlevel 41: if output =~ /^\s*#{@resource[:name]}\s*\|\s*(boot|default)/ 42: return :true 43: else 44: return :false 45: end 46: end