diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-07-26 15:58:31 -0700 |
|---|---|---|
| committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:52:57 -0700 |
| commit | 881c3858e88b6cc3d2c0e7bea6785fcbf091e4c0 (patch) | |
| tree | d7ce1350905aa2904ee001666834a5fd8f7134d2 /lib/puppet | |
| parent | 9c575bd9106b3ffed92c357ead8ff06c01c484d5 (diff) | |
| download | puppet-881c3858e88b6cc3d2c0e7bea6785fcbf091e4c0.tar.gz puppet-881c3858e88b6cc3d2c0e7bea6785fcbf091e4c0.tar.xz puppet-881c3858e88b6cc3d2c0e7bea6785fcbf091e4c0.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>
(cherry picked from commit 44e2d494f499e2005c1b31b92b97834189d4224d)
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/provider/service/windows.rb | 4 |
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 |
