rpms/cronie/devel cronie.spec,1.2,1.3

Marcela Mašláňová (mmaslano) fedora-extras-commits at redhat.com
Tue Feb 5 14:51:16 UTC 2008


Author: mmaslano

Update of /cvs/pkgs/rpms/cronie/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23893

Modified Files:
	cronie.spec 
Log Message:
431366 trigger part => after update from vixie-cron on cronie will
be daemon running.



Index: cronie.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cronie/devel/cronie.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cronie.spec	30 Jan 2008 15:25:26 -0000	1.2
+++ cronie.spec	5 Feb 2008 14:50:39 -0000	1.3
@@ -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 @@
 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 @@
 %config(noreplace) %{_sysconfdir}/cron.deny
 
 %changelog
+* Tue Feb  5 2008 Marcela Maslanova <mmaslano at redhat.com> - 1.0-3
+- 431366 trigger part => after update from vixie-cron on cronie will 
+	be daemon running.
+
 * Wed Jan 30 2008 Marcela Maslanova <mmaslano at redhat.com> - 1.0-2
 - change the provides on higher version than obsoletes
 




More information about the fedora-extras-commits mailing list