Modernize systemd scriptlets

This commit is contained in:
Petr Písař 2012-08-22 17:30:32 +02:00
parent 916552f1a3
commit 27f3ba67dc

View File

@ -5,7 +5,7 @@ Name: quota
Summary: System administration tools for monitoring users' disk usage
Epoch: 1
Version: 4.00
Release: 5%{?dist}
Release: 6%{?dist}
License: BSD and GPLv2+
URL: http://sourceforge.net/projects/linuxquota/
Group: System Environment/Base
@ -173,24 +173,13 @@ install -p -m644 -D %{SOURCE2} \
%post nld
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post quota_nld.service
%preun nld
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable quota_nld.service > /dev/null 2>&1 || :
/bin/systemctl stop quota_nld.service > /dev/null 2>&1 || :
fi
%systemd_preun quota_nld.service
%postun nld
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart quota_nld.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart quota_nld.service
%triggerun -- %{name}-nld < 1:4.00-2
echo 'quota-nld: User must migrate to systemd target manually by runnig:'
@ -242,6 +231,9 @@ echo ' systemd-sysv-convert --apply quota_nld'
%changelog
* Wed Aug 22 2012 Petr Pisar <ppisar@redhat.com> - 1:4.00-6
- Modernize systemd scriptlets (bug #850288)
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.00-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild