Scriptlets replaced with new systemd macros (#850070).

Signed-off-by: Marcela Mašláňová <mmaslano@redhat.com>
This commit is contained in:
Marcela Mašláňová 2012-09-06 12:00:39 +02:00
parent 52d8958c57
commit eb4125d034

View File

@ -6,7 +6,7 @@
Summary: Cron daemon for executing programs at set times Summary: Cron daemon for executing programs at set times
Name: cronie Name: cronie
Version: 1.4.8 Version: 1.4.8
Release: 12%{?dist} Release: 13%{?dist}
License: MIT and BSD and ISC and GPLv2 License: MIT and BSD and ISC and GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: https://fedorahosted.org/cronie URL: https://fedorahosted.org/cronie
@ -141,11 +141,7 @@ install -m 755 cronie.init $RPM_BUILD_ROOT%{_initrddir}/crond
%post %post
# run after an installation # run after an installation
if [ $1 -eq 1 ] ; then %systemd_post crond.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/bin/systemctl enable crond.service >/dev/null 2>&1 || :
fi
%post anacron %post anacron
[ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily [ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
@ -154,17 +150,11 @@ fi
%preun %preun
# run before a package is removed # run before a package is removed
if [ $1 -eq 0 ]; then %systemd_preun crond.service
/bin/systemctl --no-reload disable crond.service >/dev/null 2>&1 || :
/bin/systemctl stop crond.service > /dev/null 2>&1 || :
fi
%postun %postun
# run after a package is removed # run after a package is removed
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart crond.service
if [ $1 -ge 1 ]; then
/bin/systemctl try-restart crond.service >/dev/null 2>&1 || :
fi
%triggerun -- cronie-anacron < 1.4.1 %triggerun -- cronie-anacron < 1.4.1
# empty /etc/crontab in case there are only old regular jobs # empty /etc/crontab in case there are only old regular jobs
@ -232,6 +222,9 @@ exit 0
%attr(0755,root,root) %{_initrddir}/crond %attr(0755,root,root) %{_initrddir}/crond
%changelog %changelog
* Wed Sep 05 2012 Václav Pavlín <vpavlin@redhat.com> - 1.4.8-13
- Scriptlets replaced with new systemd macros (#850070)
* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-12 * Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild