diff --git a/cronie.spec b/cronie.spec index 09925e8..b14cbbe 100644 --- a/cronie.spec +++ b/cronie.spec @@ -4,7 +4,7 @@ Summary: Cron daemon for executing programs at set times Name: cronie Version: 1.0 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT and BSD Group: System Environment/Base URL: https://fedorahosted.org/cronie @@ -77,19 +77,30 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny rm -rf $RPM_BUILD_ROOT %post -/sbin/chkconfig --add crond - +if [ "$1" = "1" ]; then + /sbin/chkconfig --add crond +fi + %preun -if [ $1 = 0 ]; then - /sbin/service crond stop >/dev/null 2>&1 || : - /sbin/chkconfig --del crond || : +if [ "$1" = "0" ]; then + service crond stop >/dev/null 2>&1 ||: + /sbin/chkconfig --del crond fi %postun if [ "$1" -ge "1" ]; then - /sbin/service crond condrestart >/dev/null 2>&1 || : + service crond condrestart > /dev/null 2>&1 ||: fi +#copy the lock +%triggerun -- vixie-cron +cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||: + +#if the lock exist, then we restart daemon (it was running in the past). +%triggerpostun -- vixie-cron +[ -f /var/lock/subsys/cronie ] && ( rm -f /var/lock/subsys/cronie ; \ +service crond restart ) > /dev/null 2>&1 ||: + %files %defattr(-,root,root,-) %doc AUTHORS COPYING INSTALL README ChangeLog @@ -109,6 +120,10 @@ fi %config(noreplace) %{_sysconfdir}/cron.deny %changelog +* Tue Feb 5 2008 Marcela Maslanova - 1.0-3 +- 431366 trigger part => after update from vixie-cron on cronie will + be daemon running. + * Wed Jan 30 2008 Marcela Maslanova - 1.0-2 - change the provides on higher version than obsoletes