diff -Naur chrony-1.24/chrony-1.23/chrony.conf chrony-1.24.oden/chrony-1.23/chrony.conf --- chrony-1.24/chrony-1.23/chrony.conf 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony-1.23/chrony.conf 2010-02-25 13:53:05.737343580 +0100 @@ -0,0 +1,8 @@ +server x.x.x.x offline +keyfile /etc/chrony.keys +commandkey 1 +driftfile /etc/chrony.drift +logdir /var/log/chrony +log statistics measurements tracking rtc +rtcfile /etc/chrony.rtc +rtconutc diff -Naur chrony-1.24/chrony-1.23/chronyd.init chrony-1.24.oden/chrony-1.23/chronyd.init --- chrony-1.24/chrony-1.23/chronyd.init 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony-1.23/chronyd.init 2010-02-25 13:53:05.737343580 +0100 @@ -0,0 +1,56 @@ +#! /bin/sh +# +# chronyd Support for NTP . +# +# chkconfig: 345 97 13 +# description: Chrony is a implementation of NTP that support disconnected +# operation +# +# processname: chronyd +# config: /etc/chrony.conf +# config: /etc/chrony.keys + +# Get config. +. /etc/sysconfig/network + +# Get functions +. /etc/rc.d/init.d/functions + +# Check that networking is up. +if [ ${NETWORKING} = "no" ] +then + exit 0 +fi + +# See how we were called. +case "$1" in + start) + echo -n "Starting chrony services: " + daemon chronyd + + echo + touch /var/lock/subsys/chronyd + ;; + stop) + echo -n "Stopping chrony services: " + killproc chronyd + + echo + rm -f /var/lock/subsys/chronyd + ;; + status) + status chronyd + ;; + restart) + $0 stop + echo -n "Starting chrony services: " + daemon chronyd + echo + touch /var/lock/subsys/chronyd + ;; + *) + echo "Usage: chronyd {start|stop|status|restart}" + exit 1 +esac + +exit 0 diff -Naur chrony-1.24/chrony-1.23/chrony.keys chrony-1.24.oden/chrony-1.23/chrony.keys --- chrony-1.24/chrony-1.23/chrony.keys 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony-1.23/chrony.keys 2010-02-25 13:53:05.738192863 +0100 @@ -0,0 +1 @@ +1 test1 diff -Naur chrony-1.24/chrony-1.23/chrony.log chrony-1.24.oden/chrony-1.23/chrony.log --- chrony-1.24/chrony-1.23/chrony.log 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony-1.23/chrony.log 2010-02-25 13:53:05.738192863 +0100 @@ -0,0 +1,12 @@ +/var/log/chrony/measurements.log { + nocompress +} +/var/log/chrony/statistics.log { + nocompress +} +/var/log/chrony/tracking.log { + nocompress +} +/var/log/chrony/rtc.log { + nocompress +} diff -Naur chrony-1.24/chrony.conf chrony-1.24.oden/chrony.conf --- chrony-1.24/chrony.conf 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony.conf 2010-02-25 13:53:08.482218504 +0100 @@ -0,0 +1,8 @@ +server x.x.x.x offline +keyfile /etc/chrony.keys +commandkey 1 +driftfile /etc/chrony.drift +logdir /var/log/chrony +log statistics measurements tracking rtc +rtcfile /etc/chrony.rtc +rtconutc diff -Naur chrony-1.24/chronyd.init chrony-1.24.oden/chronyd.init --- chrony-1.24/chronyd.init 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chronyd.init 2010-02-25 13:53:08.482218504 +0100 @@ -0,0 +1,56 @@ +#! /bin/sh +# +# chronyd Support for NTP . +# +# chkconfig: 345 97 13 +# description: Chrony is a implementation of NTP that support disconnected +# operation +# +# processname: chronyd +# config: /etc/chrony.conf +# config: /etc/chrony.keys + +# Get config. +. /etc/sysconfig/network + +# Get functions +. /etc/rc.d/init.d/functions + +# Check that networking is up. +if [ ${NETWORKING} = "no" ] +then + exit 0 +fi + +# See how we were called. +case "$1" in + start) + echo -n "Starting chrony services: " + daemon chronyd + + echo + touch /var/lock/subsys/chronyd + ;; + stop) + echo -n "Stopping chrony services: " + killproc chronyd + + echo + rm -f /var/lock/subsys/chronyd + ;; + status) + status chronyd + ;; + restart) + $0 stop + echo -n "Starting chrony services: " + daemon chronyd + echo + touch /var/lock/subsys/chronyd + ;; + *) + echo "Usage: chronyd {start|stop|status|restart}" + exit 1 +esac + +exit 0 diff -Naur chrony-1.24/chrony.keys chrony-1.24.oden/chrony.keys --- chrony-1.24/chrony.keys 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony.keys 2010-02-25 13:53:08.482218504 +0100 @@ -0,0 +1 @@ +1 test1 diff -Naur chrony-1.24/chrony.log chrony-1.24.oden/chrony.log --- chrony-1.24/chrony.log 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/chrony.log 2010-02-25 13:53:08.483219385 +0100 @@ -0,0 +1,12 @@ +/var/log/chrony/measurements.log { + nocompress +} +/var/log/chrony/statistics.log { + nocompress +} +/var/log/chrony/tracking.log { + nocompress +} +/var/log/chrony/rtc.log { + nocompress +} diff -Naur chrony-1.24/getdate.c chrony-1.24.oden/getdate.c --- chrony-1.24/getdate.c 2010-02-04 13:07:19.000000000 +0100 +++ chrony-1.24.oden/getdate.c 2010-02-25 13:53:08.484219222 +0100 @@ -98,6 +98,8 @@ #include <stdio.h> #include <ctype.h> +#include <string.h> +#include <stdlib.h> #if HAVE_STDLIB_H # include <stdlib.h> /* for `free'; used by Bison 1.27 */ diff -Naur chrony-1.24/Makefile.in chrony-1.24.oden/Makefile.in --- chrony-1.24/Makefile.in 2010-02-04 13:07:19.000000000 +0100 +++ chrony-1.24.oden/Makefile.in 2010-02-25 13:53:08.486218860 +0100 @@ -99,6 +99,9 @@ getdate : bison -o getdate.c getdate.y +info: + -makeinfo chrony.texi + # For install, don't use the install command, because its switches # seem to vary between systems. diff -Naur chrony-1.24/README.rh chrony-1.24.oden/README.rh --- chrony-1.24/README.rh 1970-01-01 01:00:00.000000000 +0100 +++ chrony-1.24.oden/README.rh 2010-02-25 13:53:08.486218860 +0100 @@ -0,0 +1,46 @@ +This document describes setup of chrony on a Redhat system (the specific +configuration chosen for this setup). The user should read the documentation +in /usr/doc/chrony (especially the info files) for specific information +about chrony. + +The configuration file is in /etc/chrony.conf and looks like: + + server x.x.x.x offline + keyfile /etc/chrony.keys + commandkey 1 + driftfile /etc/chrony.drift + logdir /var/log/chrony + log statistics measurements tracking rtc + rtcfile /etc/chrony.rtc + rtconutc + +You should replace the "x.x.x.x" with your NTP server and add new NTP +servers to this file as necessary. Remove the "offline" parameter if +you are on a direct connection (not a dialin). If you are dialing in, +see below for more info. + +The password in the keyfile is currently "test1". You should probably +change this. +The last line assumes your clock is on UTC time. Remove it if you use +local time. + +If you are dialing in, you must adjust your startup files to handles +this. I use PPP, so that is all I know about. If you use PPP, add +the following to your /etc/ppp/ip-up.local, changing the password to +what you have chosen: + + cat <<EOF | /usr/bin/chronyc + password test1 + online + EOF + +and add the following to your /etc/ppp/ip-down.local: + + cat <<EOF | /usr/bin/chronyc + password test1 + offline + writertc + EOF + + +Corey Minyard <minyard@acm.org>