Issue-5809: Initial fix for service resource on amazon linux

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-04-20 15:26:22 +05:30
parent 1e911232f1
commit d9b527201b

View file

@ -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"