From 0fc3cb2a629be0128e9dfa17e7edf35a9692f295 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Aug 14 2013 12:15:52 +0000 Subject: 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 --- 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 2:1.0-0.11.f0d7654 +- remaining scriptlets replaced with new systemd macros (#850199) + * Mon Aug 12 2013 Prarit Bhargava 2:1.0-0.10.f0d7654 - updated to latest mcelog - removed mcelog-fix-trigger-path-and-cacheing.patch. AFAICT triggers are