Updated Windows Service check for Enabled state to allow both Auto and

Manual to be considered valid states for a service to be enabled.

Signed-off-by: Douglas <bdougl6@ms.ds.uhc.com>
This commit is contained in:
Douglas 2016-11-03 11:07:21 -05:00
parent 5624579441
commit 5e56bd4635

View file

@ -613,7 +613,8 @@ module Inspec::Resources
def service_enabled?(service)
!service['WMI'].nil? &&
!service['WMI']['StartMode'].nil? &&
service['WMI']['StartMode'] == 'Auto'
(service['WMI']['StartMode'] == 'Auto' ||
service['WMI']['StartMode'] == 'Manual')
end
# detect if service is running