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.
This commit is contained in:
parent
056d3bc8f4
commit
367f83ef95
@ -498,16 +498,15 @@ getent passwd cockpit-wsinstance >/dev/null || useradd -r -g cockpit-wsinstance
|
|||||||
|
|
||||||
%post ws
|
%post ws
|
||||||
%tmpfiles_create cockpit-tempfiles.conf
|
%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
|
# firewalld only partially picks up changes to its services files without this
|
||||||
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
|
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
|
||||||
|
|
||||||
%preun ws
|
%preun ws
|
||||||
%systemd_preun cockpit.socket
|
%systemd_preun cockpit.socket cockpit.service
|
||||||
|
|
||||||
%postun ws
|
%postun ws
|
||||||
%systemd_postun_with_restart cockpit.socket
|
%systemd_postun_with_restart cockpit.socket cockpit.service
|
||||||
%systemd_postun_with_restart cockpit.service
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------
|
||||||
# Sub-packages that are part of cockpit-system in RHEL/CentOS, but separate in Fedora
|
# Sub-packages that are part of cockpit-system in RHEL/CentOS, but separate in Fedora
|
||||||
|
Loading…
Reference in New Issue
Block a user