[packages/ntp] restore $NTPDATE_CRON behaviour in ntpdate package
glen
glen at pld-linux.org
Thu Dec 20 17:17:53 CET 2012
commit a114c2aa4713e4ac18f10ec66ed09937bc3c676e
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Dec 20 18:16:05 2012 +0200
restore $NTPDATE_CRON behaviour in ntpdate package
it got broken in 4aef70db047873b912e9aae440f9bcc562b58106
also cleanup unused cronsettime service target
ntp-client.init | 6 +-----
ntp.spec | 12 ++++++++----
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/ntp.spec b/ntp.spec
index bc239cd..f1ab040 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -11,7 +11,7 @@ Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
Summary(pt_BR.UTF-8): Network Time Protocol versão 4
Name: ntp
Version: 4.2.6p5
-Release: 5
+Release: 6
License: distributable
Group: Networking/Daemons
Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
@@ -307,9 +307,9 @@ cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate
cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/ntpd.conf
cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/init/ntpdate.conf
-install %{SOURCE10} $RPM_BUILD_ROOT%{_sbindir}/ntpdate-wrapper
-install %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/ntpd.service
-install %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/ntpdate.service
+install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sbindir}/ntpdate-wrapper
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/ntpd.service
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/ntpdate.service
cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
@@ -318,6 +318,10 @@ touch $RPM_BUILD_ROOT/var/lib/ntp/drift
cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntpdate <<'EOF'
#!/bin/sh
+# Source ntpdate configuration
+. /etc/sysconfig/ntpdate
+
+is_yes "$NTPDATE_CRON" || exit 0
exec /usr/sbin/ntpdate-wrapper
EOF
diff --git a/ntp-client.init b/ntp-client.init
index ff624c5..73ba5b0 100644
--- a/ntp-client.init
+++ b/ntp-client.init
@@ -8,7 +8,7 @@
# Source function library.
. /etc/rc.d/init.d/functions
-upstart_controlled --except cronsettime
+upstart_controlled
# Source networking configuration.
. /etc/sysconfig/network
@@ -61,10 +61,6 @@ restart|force-reload)
stop
start
;;
-cronsettime)
- is_yes "$NTPDATE_CRON" && /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS
- RETVAL=$?
- ;;
*)
msg_usage "$0 {start|restart|force-reload}"
exit 3
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ntp.git/commitdiff/a114c2aa4713e4ac18f10ec66ed09937bc3c676e
More information about the pld-cvs-commit
mailing list