From a29b4580c3f9e3c25fc8fe5e161451cf20fcaa4c Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Fri, 6 Dec 2024 11:58:31 -0300 Subject: [PATCH] ensure_logrotate_activated: Check timers.target.wants as well Expand check to also verify systemd timers.target.wants directory. Some systems may not have logrotate.timers defined in multi-user.target.wants. --- .../ensure_logrotate_activated/oval/shared.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linux_os/guide/system/logging/log_rotation/ensure_logrotate_activated/oval/shared.xml b/linux_os/guide/system/logging/log_rotation/ensure_logrotate_activated/oval/shared.xml index a13b81a329c..b4cb3fbadc6 100644 --- a/linux_os/guide/system/logging/log_rotation/ensure_logrotate_activated/oval/shared.xml +++ b/linux_os/guide/system/logging/log_rotation/ensure_logrotate_activated/oval/shared.xml @@ -12,7 +12,7 @@ {{% if product in ["rhcos4", "rhel9", "rhel10", "sle12", "sle15", "ol9"] %}} - + {{% endif %}} @@ -56,14 +56,14 @@ {{% if product in ["rhcos4", "rhel9", "rhel10", "sle12", "sle15", "ol9"] %}} - + comment="look for logrotate.timer in multi-user.target.wants and timers.target.wants" + id="test_logrotate_enabled_systemd_target" version="1"> + - - /etc/systemd/system/multi-user.target.wants/logrotate.timer + + ^/etc/systemd/system/(multi-user|timers)\.target\.wants/logrotate\.timer$ unit_logrotate_state_symlink