packages: chrony/chrony.spec, chrony/chronyd.upstart (NEW) - add upstart co...

glen glen at pld-linux.org
Wed Dec 14 08:58:34 CET 2011


Author: glen                         Date: Wed Dec 14 07:58:34 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add upstart config

---- Files affected:
packages/chrony:
   chrony.spec (1.6 -> 1.7) , chronyd.upstart (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/chrony/chrony.spec
diff -u packages/chrony/chrony.spec:1.6 packages/chrony/chrony.spec:1.7
--- packages/chrony/chrony.spec:1.6	Fri Aug 26 15:05:21 2011
+++ packages/chrony/chrony.spec	Wed Dec 14 08:58:29 2011
@@ -2,7 +2,7 @@
 Summary:	An NTP client/server
 Name:		chrony
 Version:	1.26
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Daemons
 URL:		http://chrony.tuxfamily.org/
@@ -13,6 +13,7 @@
 Source3:	%{name}d.sysconfig
 Source4:	%{name}d.init
 Source5:	%{name}.logrotate
+Source6:	%{name}d.upstart
 BuildRequires:	bison
 BuildRequires:	libcap-devel
 BuildRequires:	readline-devel
@@ -59,7 +60,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{sysconfig,logrotate.d,rc.d/init.d} \
+install -d $RPM_BUILD_ROOT/etc/{sysconfig,logrotate.d,rc.d/init.d,init} \
 	$RPM_BUILD_ROOT{%{_sysconfdir},/var/{lib/ntp,log/chrony}}
 
 %{__make} install install-docs \
@@ -72,6 +73,7 @@
 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/chronyd
 cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/chrony
 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/chronyd
+cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/init/chronyd.conf
 
 touch $RPM_BUILD_ROOT%{_localstatedir}/lib/ntp/{drift,rtc}
 
@@ -107,8 +109,8 @@
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/chrony.conf
 %attr(640,root,ntp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keys
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/chronyd
+%config(noreplace) %verify(not md5 mtime size) /etc/init/chronyd.conf
 %config(noreplace) /etc/logrotate.d/chrony
-%attr(754,root,root) /etc/rc.d/init.d/chronyd
 %attr(755,root,root) %{_bindir}/chronyc
 %attr(755,root,root) %{_sbindir}/chronyd
 %{_mandir}/man1/chrony.1*
@@ -129,6 +131,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2011/12/14 07:58:29  glen
+- add upstart config
+
 Revision 1.6  2011/08/26 13:05:21  arekm
 - rel 2; fix-info-dir fix
 

================================================================
Index: packages/chrony/chronyd.upstart
diff -u /dev/null packages/chrony/chronyd.upstart:1.1
--- /dev/null	Wed Dec 14 08:58:34 2011
+++ packages/chrony/chronyd.upstart	Wed Dec 14 08:58:29 2011
@@ -0,0 +1,22 @@
+description "NTP daemon"
+
+start on pld.network-started
+stop on pld.shutdown-started
+
+env NTPD_USER="ntp"
+env NTPD_OPTIONS=""
+
+respawn
+
+pre-start script
+	# do not bother to start if not configured
+	[ -f /etc/ntp/chrony.conf ] || /sbin/initctl stop
+end script
+
+script
+	# Source old-style ntp service configuration
+	[ -f /etc/sysconfig/chronyd ] && . /etc/sysconfig/chronyd
+
+	export USE_UPSTART=no
+	exec /etc/rc.d/init.d/chronyd start
+end script
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/chrony/chrony.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list