mirror of
https://github.com/inspec/inspec
synced 2024-11-11 07:34:15 +00:00
Clarified service logic logic for redhat flavors.
Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
ad6ffcccd6
commit
faf7833559
1 changed files with 5 additions and 1 deletions
|
@ -141,7 +141,11 @@ module Inspec::Resources
|
|||
end
|
||||
when "redhat", "fedora", "centos", "oracle", "cloudlinux"
|
||||
version = os[:release].to_i
|
||||
if (%w{redhat centos oracle cloudlinux}.include?(platform) && version >= 7) || (platform == "fedora" && version >= 15)
|
||||
|
||||
systemd = ((platform != "fedora" && version >= 7) ||
|
||||
(platform == "fedora" && version >= 15))
|
||||
|
||||
if systemd
|
||||
Systemd.new(inspec, service_ctl)
|
||||
else
|
||||
SysV.new(inspec, service_ctl || "/sbin/service")
|
||||
|
|
Loading…
Reference in a new issue