Skip to content

Commit

Permalink
rpm: revert suppressing systemd_post macro (#759)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
daipom authored Dec 10, 2024
1 parent 4fed1fe commit c2821b0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions fluent-package/yum/fluent-package.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,7 @@ fi
%systemd_preun @[email protected]

%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 @[email protected]
fi
%systemd_post @[email protected]
if [ $1 -eq 1 ]; then
if [ -d /etc/@COMPAT_PACKAGE_DIR@ -a ! -h /etc/@COMPAT_PACKAGE_DIR@ ]; then
touch %{v4migration}
Expand Down

0 comments on commit c2821b0

Please sign in to comment.