mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
add fedora support
This commit is contained in:
parent
2484623220
commit
7806951051
1 changed files with 4 additions and 2 deletions
|
@ -26,7 +26,9 @@ class Service < Vulcano.resource(1)
|
|||
# select package manager
|
||||
@service_mgmt = nil
|
||||
@cache = nil
|
||||
case vulcano.os[:family]
|
||||
|
||||
family = vulcano.os[:family]
|
||||
case family
|
||||
# Ubuntu
|
||||
# @see: https://wiki.ubuntu.com/SystemdForUpstartUsers
|
||||
# Ubuntu 15.04 : Systemd
|
||||
|
@ -51,7 +53,7 @@ class Service < Vulcano.resource(1)
|
|||
end
|
||||
when 'redhat', 'fedora'
|
||||
version = os[:release].to_i
|
||||
if version >= 7
|
||||
if (family == 'redhat' && version >= 7) || (family == 'fedora' && version >= 15)
|
||||
@service_mgmt = Systemd.new(vulcano)
|
||||
else
|
||||
@service_mgmt = SysV.new(vulcano)
|
||||
|
|
Loading…
Reference in a new issue