From c2821b0b4493ac71d0c271197e883a7b94bb929c Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Tue, 10 Dec 2024 11:05:21 +0900 Subject: [PATCH] rpm: revert suppressing systemd_post macro (#759) We don't need to suppress this macro because this macro handles preset, not restart. I have confirmed that this macro of the package for RHEL 9 is expanded as follows. ```bash if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Initial installation /usr/lib/systemd/systemd-update-helper install-system-units fluentd.service || : fi ``` Signed-off-by: Daijiro Fukuda --- fluent-package/yum/fluent-package.spec.in | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fluent-package/yum/fluent-package.spec.in b/fluent-package/yum/fluent-package.spec.in index ec5f56c2..c3b50eb8 100644 --- a/fluent-package/yum/fluent-package.spec.in +++ b/fluent-package/yum/fluent-package.spec.in @@ -200,15 +200,7 @@ fi %systemd_preun @SERVICE_NAME@.service %post -. %{_sysconfdir}/sysconfig/@SERVICE_NAME@ -echo "post FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART" -if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "auto" ]; then - echo "Suppress auto restart in auto mode..." -elif [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then - echo "Suppress auto restart in manual mode ..." -else - %systemd_post @SERVICE_NAME@.service -fi +%systemd_post @SERVICE_NAME@.service if [ $1 -eq 1 ]; then if [ -d /etc/@COMPAT_PACKAGE_DIR@ -a ! -h /etc/@COMPAT_PACKAGE_DIR@ ]; then touch %{v4migration}