summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-19 11:30:53 -0800
committerTim Smith <tsmith@chef.io>2017-12-19 11:30:53 -0800
commit8f51bec4799e32784af6d0f790145906deb5c52c (patch)
tree20dfd2a78ed146b77e66f5c1848b7e2e60f5d73f
parentfc813e21f253d5278cb42710874a34cfebfcc8ca (diff)
downloadchef-launchd.tar.gz
Modernize launchd resourcelaunchd
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/launchd.rb1
-rw-r--r--lib/chef/resource/launchd.rb6
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef/provider/launchd.rb b/lib/chef/provider/launchd.rb
index 8281410d42..8d868784dd 100644
--- a/lib/chef/provider/launchd.rb
+++ b/lib/chef/provider/launchd.rb
@@ -17,7 +17,6 @@
#
require "chef/provider"
-require "chef/resource/launchd"
require "chef/resource/file"
require "chef/resource/cookbook_file"
require "chef/resource/macosx_service"
diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb
index 3fba76e220..3a85fed14f 100644
--- a/lib/chef/resource/launchd.rb
+++ b/lib/chef/resource/launchd.rb
@@ -17,19 +17,17 @@
#
require "chef/resource"
-require "chef/provider/launchd"
class Chef
class Resource
class Launchd < Chef::Resource
+ resource_name :launchd
provides :launchd, os: "darwin"
- identity_attr :label
-
default_action :create
allowed_actions :create, :create_if_missing, :delete, :enable, :disable, :restart
- property :label, String, default: lazy { name }, identity: true
+ property :label, String, identity: true, name_property: true
property :backup, [Integer, FalseClass]
property :cookbook, String
property :group, [String, Integer]