From 367f83ef95dd47cac57934aee02af530ab01a4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 15:56:42 +0100 Subject: [PATCH] Coalesce systemd scriptlets It is more efficient to do callout just once. Also, call the scriptlets for all units. For some units the scriptlets are noops, but it's more future-proof to call them anyway. --- cockpit.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cockpit.spec b/cockpit.spec index 3bab726..63e42d1 100644 --- a/cockpit.spec +++ b/cockpit.spec @@ -498,16 +498,15 @@ getent passwd cockpit-wsinstance >/dev/null || useradd -r -g cockpit-wsinstance %post ws %tmpfiles_create cockpit-tempfiles.conf -%systemd_post cockpit.socket +%systemd_post cockpit.socket cockpit.service # firewalld only partially picks up changes to its services files without this test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true %preun ws -%systemd_preun cockpit.socket +%systemd_preun cockpit.socket cockpit.service %postun ws -%systemd_postun_with_restart cockpit.socket -%systemd_postun_with_restart cockpit.service +%systemd_postun_with_restart cockpit.socket cockpit.service # ------------------------------------------------------------------------------- # Sub-packages that are part of cockpit-system in RHEL/CentOS, but separate in Fedora