diff --git a/psacct.spec b/psacct.spec index ee6172e..b4706ed 100644 --- a/psacct.spec +++ b/psacct.spec @@ -4,7 +4,7 @@ Summary: Utilities for monitoring process activities Name: psacct Version: 6.5.5 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv3+ Group: Applications/System URL: ftp://ftp.gnu.org/pub/gnu/acct/ @@ -78,29 +78,21 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/last $RPM_BUILD_ROOT%{_mandir}/man1/last.1* %endif %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post psacct.service /sbin/install-info %{_infodir}/accounting.info %{_infodir}/dir || : touch /var/account/pacct %preun +%systemd_preun psacct.service + if [ $1 -eq 0 ]; then # Package removal, not upgrade - /bin/systemctl --no-reload psacct.service > /dev/null 2>&1 || : - /bin/systemctl stop psacct.service > /dev/null 2>&1 || : - /sbin/install-info --delete %{_infodir}/accounting.info %{_infodir}/dir || : fi %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart psacct.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart psacct.service %triggerun -- psacct < 6.5.5-3 # Save the current service runlevel info @@ -139,6 +131,9 @@ fi %{_infodir}/accounting.info.gz %changelog +* Mon Aug 27 2012 Jaromir Capik - 6.5.5-7 +- Migration to new systemd scriptlet macros + * Sat Jul 21 2012 Fedora Release Engineering - 6.5.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild