[packages/nut] - use common macros to enable systemd services
baggins
baggins at pld-linux.org
Tue Jan 4 21:18:52 CET 2022
commit 58bde1866b3660dcac811bd5a08075b0b4823c48
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Jan 4 21:18:31 2022 +0100
- use common macros to enable systemd services
nut.spec | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/nut.spec b/nut.spec
index e115d8a..f9cd678 100644
--- a/nut.spec
+++ b/nut.spec
@@ -295,10 +295,7 @@ fi
%systemd_reload
%triggerpostun -- nut < 2.6.4-2
-[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
-[ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0
-[ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]ups)" != "/etc/rc.d/rc[0-6].d/S[0-9][0-9]ups" ] || exit 0
-%systemd_service_enable nut-driver.service nut-server.service
+%systemd_trigger nut-driver.service nut-server.service
%pre common
# move to trigger?
@@ -335,11 +332,7 @@ fi
%systemd_reload
%triggerpostun client -- nut-client < 2.6.4-2
-[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
-[ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0
-/sbin/chkconfig --list upsmon 2>/dev/null | grep -qsv "[0-6]:on" && exit 0
-[ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]upsmon)" != "/etc/rc.d/rc[0-6].d/S[0-9][0-9]upsmon" ] || exit 0
-%systemd_service_enable nut-monitor.service
+%systemd_trigger nut-monitor.service
%files
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nut.git/commitdiff/58bde1866b3660dcac811bd5a08075b0b4823c48
More information about the pld-cvs-commit
mailing list