mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
try to use sysv fallback if is not producing proper output
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
parent
71ee19ad3b
commit
8b1619b60e
1 changed files with 1 additions and 1 deletions
|
@ -336,7 +336,7 @@ module Inspec::Resources
|
|||
status = inspec.command("#{service_ctl} status #{service_name}")
|
||||
|
||||
# fallback for systemv services, those are not handled via `initctl`
|
||||
return SysV.new(inspec).info(service_name) if status.exit_status.to_i != 0
|
||||
return SysV.new(inspec).info(service_name) if status.exit_status.to_i != 0 || status.stdout == ''
|
||||
|
||||
# @see: http://upstart.ubuntu.com/cookbook/#job-states
|
||||
# grep for running to indicate the service is there
|
||||
|
|
Loading…
Reference in a new issue