summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-26 15:58:31 -0700
committerNick Lewis <nick@puppetlabs.com>2011-07-26 16:41:05 -0700
commit44e2d494f499e2005c1b31b92b97834189d4224d (patch)
treec37c9dc06fbcc0e270d1e8a0a6d280ef4bc97a2b /lib
parent38c181d00e87ecc699c6a3e23dd2155f716a6602 (diff)
downloadpuppet-44e2d494f499e2005c1b31b92b97834189d4224d.tar.gz
puppet-44e2d494f499e2005c1b31b92b97834189d4224d.tar.xz
puppet-44e2d494f499e2005c1b31b92b97834189d4224d.zip
(#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 <jacob@puppetlabs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/service/windows.rb4
1 files changed, 2 insertions, 2 deletions
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