From d21197474f5859c4426c9512878fbf5c6d522fee Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 27 Aug 2012 14:11:33 +0200 Subject: [PATCH] Updated RPM scriptlets with latest systemd-rpm macros Resolves: #850246 --- OpenIPMI.spec | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/OpenIPMI.spec b/OpenIPMI.spec index 051a456..b6a4621 100644 --- a/OpenIPMI.spec +++ b/OpenIPMI.spec @@ -4,7 +4,7 @@ Summary: IPMI (Intelligent Platform Management Interface) library and tools Name: OpenIPMI Version: 2.0.19 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ and GPLv2+ or BSD Group: System Environment/Base URL: http://sourceforge.net/projects/openipmi/ @@ -95,24 +95,13 @@ install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_unitdir}/ipmi.service rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/openipmigui.1 %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post ipmi.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ipmi.service > /dev/null 2>&1 || : - /bin/systemctl stop ipmi.service > /dev/null 2>&1 || : -fi +%systemd_preun ipmi.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ipmi.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart ipmi.service %post libs -p /sbin/ldconfig @@ -177,6 +166,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/*.pc %changelog +* Mon Aug 27 2012 Jan Safranek - 2.0.19-2 +- Updated RPM scriptlets with latest systemd-rpm macros (#850246) + * Wed Aug 8 2012 Jan Safranek - 2.0.19-1 - Update to 2.0.19