From 66c70b753d57ce6d68060e7adece16c76444272a Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 27 Aug 2012 13:18:46 +0200 Subject: [PATCH] Updated RPM scriplets with latest systemd-rpm macros Resolves: #850161 --- ipmitool.spec | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ipmitool.spec b/ipmitool.spec index e9006af..b5ff6c7 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -65,24 +65,13 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/ipmievd.service install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/ipmievd %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post ipmievd.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ipmievd.service > /dev/null 2>&1 || : - /bin/systemctl stop ipmievd.service > /dev/null 2>&1 || : -fi +%systemd_preun ipmievd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ipmievd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart ipmievd.service %triggerun -- ipmievd < 1.8.11-7 # Save the current service runlevel info @@ -107,6 +96,7 @@ fi %changelog * Mon Aug 27 2012 Jan Safranek - 1.8.12-2 - Fixed starting ipmievd under systemd (#819234). +- Updated RPM scriplets with latest systemd-rpm macros (#850161) * Fri Aug 10 2012 Jan Safranek - 1.8.12-1 - update to ipmitool-1.8.12