mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +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
1e911232f1
commit
d9b527201b
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