Skip to content
Snippets Groups Projects

Draft: RHEL support

Open Christopher Huhn requested to merge centos into master
Files
24
+ 19
4
@@ -2,7 +2,7 @@
# Cookbook:: sys
# Helper library class
#
# Copyright:: 2015-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Copyright:: 2015-2025 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Dennis Klein <d.klein@gsi.de>
@@ -42,11 +42,26 @@ module Sys
node['platform'] == 'debian'
end
# where to store certificates and keys?
def pki_base_path
case node['platform_family']
when 'rhel'
'/etc/pki/tls'
else
'/etc/ssl'
end
end
# Detect installed systemd
def systemd_installed?
cmd = Mixlib::ShellOut.new('dpkg -s systemd-sysv')
cmd.run_command
cmd.exitstatus == 0
case node['platform_family']
when 'rhel'
true # systemd since RHEL7
when 'debian'
cmd = Mixlib::ShellOut.new('dpkg -s systemd-sysv')
cmd.run_command
cmd.exitstatus == 0
end
end
# Detect active systemd instance
Loading