From 1d0d7588dd2bc5efd88533d4c6170ca978abb45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 10:42:42 +0100 Subject: [PATCH] Simplify systemd scriplets It is better to use a single %systemd_* macro to avoid some executions and repeated checks. --- util-linux.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index d7c000a..e2b6fb2 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -454,16 +454,14 @@ exit 0 %systemd_post uuidd.service if [ $1 -eq 1 ] && [ -x /usr/bin/systemctl ]; then # install - /bin/systemctl start uuidd.service > /dev/null 2>&1 || : + /usr/bin/systemctl start uuidd.service > /dev/null 2>&1 || : fi %preun -n uuidd -%systemd_preun uuidd.socket -%systemd_preun uuidd.service +%systemd_preun uuidd.socket uuidd.service %postun -n uuidd -%systemd_postun_with_restart uuidd.socket -%systemd_postun_with_restart uuidd.service +%systemd_postun_with_restart uuidd.socket uuidd.service %triggerpostun -- util-linux < 2.35.1-7 if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then