Method: Chef::Provider::Service::Arch#load_current_resource

Defined in:
lib/chef/provider/service/arch.rb

#load_current_resourceObject



29
30
31
32
33
34
35
36
# File 'lib/chef/provider/service/arch.rb', line 29

def load_current_resource
  raise Chef::Exceptions::Service, "Could not find /etc/rc.conf"  unless ::File.exists?("/etc/rc.conf")
  raise Chef::Exceptions::Service, "No DAEMONS found in /etc/rc.conf"  unless ::File.read("/etc/rc.conf").match(/DAEMONS=\((.*)\)/m)
  super

  @current_resource.enabled(daemons.include?(@current_resource.service_name))
  @current_resource
end