mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Issue-5809: Initial fix for service resource on amazon linux
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
b6f9146894
commit
1972d15afa
1 changed files with 6 additions and 5 deletions
|
@ -182,11 +182,12 @@ module Inspec::Resources
|
|||
when "aix"
|
||||
SrcMstr.new(inspec)
|
||||
when "amazon"
|
||||
if os[:release] =~ /^20\d\d/
|
||||
Upstart.new(inspec, service_ctl)
|
||||
else
|
||||
Systemd.new(inspec, service_ctl)
|
||||
end
|
||||
inspec.command("initctl").exist? ? Upstart.new(inspec, service_ctl) : Systemd.new(inspec, service_ctl)
|
||||
# if os[:release] =~ /^20\d\d/
|
||||
# Upstart.new(inspec, service_ctl)
|
||||
# else
|
||||
# Systemd.new(inspec, service_ctl)
|
||||
# end
|
||||
when "solaris", "smartos", "omnios", "openindiana", "opensolaris", "nexentacore"
|
||||
Svcs.new(inspec)
|
||||
when "yocto"
|
||||
|
|
Loading…
Reference in a new issue