[mcelog] Replace remaining scriptlets with new systemd-rpm macros in spec file
Prarit Bhargava
prarit at fedoraproject.org
Wed Aug 14 12:28:30 UTC 2013
commit 0fc3cb2a629be0128e9dfa17e7edf35a9692f295
Author: Prarit Bhargava <prarit at redhat.com>
Date: Wed Aug 14 08:15:52 2013 -0400
Replace remaining scriptlets with new systemd-rpm macros in spec file
- remaining scriptlets replaced with new systemd macros (#850199)
- many thanks to Lukás Nykrýn and Václav Pavlín
mcelog.spec | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/mcelog.spec b/mcelog.spec
index a01d6cc..8fbb169 100644
--- a/mcelog.spec
+++ b/mcelog.spec
@@ -3,7 +3,7 @@
Summary: Tool to translate x86-64 CPU Machine Check Exception data
Name: mcelog
Version: 1.0
-Release: 0.10.%{last_git_commit}%{?dist}
+Release: 0.11.%{last_git_commit}%{?dist}
Epoch: 2
Group: System Environment/Base
License: GPLv2
@@ -54,21 +54,14 @@ install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/mcelog.service
install -p -m644 mcelog.8 $RPM_BUILD_ROOT/%{_mandir}/man8
%post
-systemctl enable mcelog.service &> /dev/null ||
-systemctl daemon-reload &> /dev/null
+%systemd_post mcelog.service
%preun
-# Handle removing mcelog
-if [ "$1" -eq 0 ]; then
- systemctl disable mcelog.service &> /dev/null
- systemctl stop mcelog.service &> /dev/null
-fi
+%systemd_preun mcelog.service
%postun
# Handle upgrading mcelog
-if [ "$1" -ge 1 ]; then
- systemctl try-restart mcelog.service &> /dev/null
-fi
+%systemd_postun_with_restart mcelog.service
%files
%doc README CHANGES
@@ -82,6 +75,9 @@ fi
%attr(0644,root,root) %{_mandir}/*/*
%changelog
+* Wed Aug 14 2013 Prarit Bhargava <prarit at redhat.com> 2:1.0-0.11.f0d7654
+- remaining scriptlets replaced with new systemd macros (#850199)
+
* Mon Aug 12 2013 Prarit Bhargava <prarit at redhat.com> 2:1.0-0.10.f0d7654
- updated to latest mcelog
- removed mcelog-fix-trigger-path-and-cacheing.patch. AFAICT triggers are
More information about the scm-commits
mailing list