From 881c3858e88b6cc3d2c0e7bea6785fcbf091e4c0 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Tue, 26 Jul 2011 15:58:31 -0700 Subject: (#8272) Use symbols instead of booleans for enabled property on Windows Because the enable property of the service type uses :true and :false as its valid values, rather than true and false, we need to return :true and :false from our enabled? method. Otherwise, the property was being synced every time it was enabled or disabled, regardless of whether it was actually in sync or not. Reviewed-By: Jacob Helwig (cherry picked from commit 44e2d494f499e2005c1b31b92b97834189d4224d) --- lib/puppet/provider/service/windows.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/puppet/provider/service/windows.rb b/lib/puppet/provider/service/windows.rb index 56d56b0a9..d77f3b44a 100644 --- a/lib/puppet/provider/service/windows.rb +++ b/lib/puppet/provider/service/windows.rb @@ -46,11 +46,11 @@ Puppet::Type.type(:service).provide :windows do when Win32::Service.get_start_type(Win32::Service::SERVICE_AUTO_START), Win32::Service.get_start_type(Win32::Service::SERVICE_BOOT_START), Win32::Service.get_start_type(Win32::Service::SERVICE_SYSTEM_START) - true + :true when Win32::Service.get_start_type(Win32::Service::SERVICE_DEMAND_START) :manual when Win32::Service.get_start_type(Win32::Service::SERVICE_DISABLED) - false + :false else raise Puppet::Error.new("Unknown start type: #{w32ss.start_type}") end -- cgit