From a63d60bb3e0caae18b30e02e09ac8b1adc944eb2 Mon Sep 17 00:00:00 2001 From: Milan Lysonek Date: Thu, 3 Oct 2024 14:10:01 +0200 Subject: [PATCH 1/3] Rename cron package to cronie for RHEL10 product --- .../guide/services/cron_and_at/package_cron_installed/rule.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux_os/guide/services/cron_and_at/package_cron_installed/rule.yml b/linux_os/guide/services/cron_and_at/package_cron_installed/rule.yml index c41df7af30c..b984b731cf8 100644 --- a/linux_os/guide/services/cron_and_at/package_cron_installed/rule.yml +++ b/linux_os/guide/services/cron_and_at/package_cron_installed/rule.yml @@ -1,4 +1,4 @@ -{{% if product in ["sle12", "sle15"] %}} +{{% if product in ["rhel10", "sle12", "sle15"] %}} {{% set package_name = "cronie" %}} {{% else %}} {{% set package_name = "cron" %}} @@ -42,5 +42,6 @@ template: name: package_installed vars: pkgname: cron + pkgname@rhel10: cronie pkgname@sle12: cronie pkgname@sle15: cronie From 83123463602e9db5a128b49cd2dd7fac39480d46 Mon Sep 17 00:00:00 2001 From: Milan Lysonek Date: Mon, 7 Oct 2024 11:12:53 +0200 Subject: [PATCH 2/3] Fix cron service name for RHEL distros --- .../cron_and_at/service_cron_enabled/rule.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml b/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml index 77c3ffbc376..19443e6e51b 100644 --- a/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml +++ b/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml @@ -1,3 +1,9 @@ +{{% if product in ["rhel8", "rhel9", "rhel10"] %}} +{{% set service_name = "crond" %}} +{{% else %}} +{{% set service_name = "cron" %}} +{{% endif %}} + documentation_complete: true title: 'Enable cron Service' @@ -6,7 +12,7 @@ description: |- The crond service is used to execute commands at preconfigured times. It is required by almost all systems to perform necessary maintenance tasks, such as notifying root of system activity. - {{{ describe_service_enable(service="cron") }}} + {{{ describe_service_enable(service=service_name) }}} rationale: |- Due to its usage for maintenance and security-supporting tasks, @@ -34,9 +40,12 @@ references: nist-csf: PR.IP-1,PR.PT-3 ocil: |- - {{{ ocil_service_enabled(service="cron") }}} + {{{ ocil_service_enabled(service=service_name) }}} template: name: service_enabled vars: servicename: cron + servicename@rhel8: crond + servicename@rhel9: crond + servicename@rhel10: crond From 3e8ae2c95bc6cf44c6900a65a46342eac6fe508d Mon Sep 17 00:00:00 2001 From: Milan Lysonek Date: Mon, 7 Oct 2024 15:41:18 +0200 Subject: [PATCH 3/3] Set proper package name for service_cron_enabled --- .../guide/services/cron_and_at/service_cron_enabled/rule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml b/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml index 19443e6e51b..7977cba9f31 100644 --- a/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml +++ b/linux_os/guide/services/cron_and_at/service_cron_enabled/rule.yml @@ -49,3 +49,5 @@ template: servicename@rhel8: crond servicename@rhel9: crond servicename@rhel10: crond + packagename: cron + packagename@rhel10: cronie