]> git.pld-linux.org Git - packages/chrony.git/commitdiff
- add upstart config auto/th/chrony-1_26-3
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 14 Dec 2011 07:58:29 +0000 (07:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    chrony.spec -> 1.7
    chronyd.upstart -> 1.1

chrony.spec
chronyd.upstart [new file with mode: 0644]

index dba965bd713d4bcdb01fc904a9b3d40522f78dd0..56fdf83db2a1c8041b69dc0cd74787eaccd22493 100644 (file)
@@ -1,7 +1,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/
@@ -12,6 +12,7 @@ Source2:      %{name}.keys
 Source3:       %{name}d.sysconfig
 Source4:       %{name}d.init
 Source5:       %{name}.logrotate
+Source6:       %{name}d.upstart
 BuildRequires: bison
 BuildRequires: libcap-devel
 BuildRequires: readline-devel
@@ -58,7 +59,7 @@ CPPFLAGS="%{rpmcppflags}" \
 
 %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 \
@@ -71,6 +72,7 @@ cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
 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}
 
@@ -106,8 +108,8 @@ fi
 %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*
diff --git a/chronyd.upstart b/chronyd.upstart
new file mode 100644 (file)
index 0000000..0e25550
--- /dev/null
@@ -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
This page took 0.122121 seconds and 4 git commands to generate.