From 9c310a392c3e566a91eedb8d2010fd3c622eada3 Mon Sep 17 00:00:00 2001 From: Matus Marhefka Date: Tue, 5 Nov 2024 16:40:46 +0100 Subject: [PATCH] Update rsyslog_cron_logging for bootable containers Remediation of the rule `rsyslog_cron_logging` calls `systemctl reload` which doesn't work in the bootable container build environment and so we use the `bash_not_bootc_build` macro to not run it there. --- .../rsyslog_cron_logging/bash/shared.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_cron_logging/bash/shared.sh b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_cron_logging/bash/shared.sh index 773f88904a2..8fa32223f1f 100644 --- a/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_cron_logging/bash/shared.sh +++ b/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_cron_logging/bash/shared.sh @@ -5,4 +5,6 @@ if ! grep -s "^\s*cron\.\*\s*/var/log/cron$" /etc/rsyslog.conf /etc/rsyslog.d/*. echo "cron.* /var/log/cron" >> /etc/rsyslog.d/cron.conf fi -systemctl restart rsyslog.service +if {{{ bash_not_bootc_build() }}} ; then + systemctl restart rsyslog.service +fi