summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2017-12-20 09:14:28 +0000
committerGitHub <noreply@github.com>2017-12-20 09:14:28 +0000
commitfbfb8abd0a0a70c54a5311215d214e8842b332dd (patch)
tree09213d8cd26d7980c221a034a476236b1ae928bb
parentf0d732cd6df9126bede1e822016c23d99d178165 (diff)
parent8f51bec4799e32784af6d0f790145906deb5c52c (diff)
downloadchef-fbfb8abd0a0a70c54a5311215d214e8842b332dd.tar.gz
Merge pull request #6698 from chef/launchd
Modernize launchd resource
-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 358d5462bc..121af1555c 100644
--- a/lib/chef/resource/launchd.rb
+++ b/lib/chef/resource/launchd.rb
@@ -17,7 +17,6 @@
#
require "chef/resource"
-require "chef/provider/launchd"
class Chef
class Resource
@@ -25,14 +24,13 @@ class Chef
#
# @since 12.8
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]