summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service
diff options
context:
space:
mode:
authorJason Barnett <jason.w.barnett@gmail.com>2019-04-10 08:15:43 -0400
committerJason Barnett <jason.w.barnett@gmail.com>2019-04-15 18:07:21 -0400
commitb49cfbe7b8f51bd04e255cf74389eaed4f54f63f (patch)
treeec6c78e915a4faa473f633ec5f4664bea00bf910 /lib/chef/provider/service
parent2fe2f5029df438ff92274b3240df5f5bee10c067 (diff)
downloadchef-b49cfbe7b8f51bd04e255cf74389eaed4f54f63f.tar.gz
Prevent accidentally configuring windows_service properties
Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r--lib/chef/provider/service/windows.rb18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb
index 23be4c0396..4759e34153 100644
--- a/lib/chef/provider/service/windows.rb
+++ b/lib/chef/provider/service/windows.rb
@@ -208,11 +208,6 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service
return
end
- # Until #6300 is solved this is required
- if new_resource.run_as_user == new_resource.class.properties[:run_as_user].default
- new_resource.run_as_user = new_resource.class.properties[:run_as_user].default
- end
-
converge_if_changed :service_type, :startup_type, :error_control,
:binary_path_name, :load_order_group, :dependencies,
:run_as_user, :display_name, :description do
@@ -400,16 +395,11 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service
end
def converge_delayed_start
- config = {}
- config[:service_name] = new_resource.service_name
- config[:delayed_start] = new_resource.delayed_start ? 1 : 0
-
- # Until #6300 is solved this is required
- if new_resource.delayed_start == new_resource.class.properties[:delayed_start].default
- new_resource.delayed_start = new_resource.class.properties[:delayed_start].default
- end
-
converge_if_changed :delayed_start do
+ config = {}
+ config[:service_name] = new_resource.service_name
+ config[:delayed_start] = new_resource.delayed_start ? 1 : 0
+
Win32::Service.configure(config)
end
end