diff options
author | Johannes Winkelmann <jw@smts.ch> | 2006-02-23 15:26:10 +0000 |
---|---|---|
committer | Johannes Winkelmann <jw@smts.ch> | 2006-02-23 15:26:10 +0000 |
commit | bdea7e6c6a535e57a07d376a3139d0788efaaa41 (patch) | |
tree | 1a7334c99fa39b1ad1a7a35c113b18cb0d92413c /chrony | |
download | opt-bdea7e6c6a535e57a07d376a3139d0788efaaa41.tar.gz opt-bdea7e6c6a535e57a07d376a3139d0788efaaa41.tar.xz |
create branch for 2.2
Diffstat (limited to 'chrony')
-rw-r--r-- | chrony/.footprint | 23 | ||||
-rw-r--r-- | chrony/.md5sum | 4 | ||||
-rw-r--r-- | chrony/Pkgfile | 23 | ||||
-rw-r--r-- | chrony/README | 37 | ||||
-rw-r--r-- | chrony/chrony.conf | 30 | ||||
-rw-r--r-- | chrony/chrony.keys | 7 | ||||
-rw-r--r-- | chrony/chronyd | 40 |
7 files changed, 164 insertions, 0 deletions
diff --git a/chrony/.footprint b/chrony/.footprint new file mode 100644 index 000000000..ea3c92b5c --- /dev/null +++ b/chrony/.footprint @@ -0,0 +1,23 @@ +drwxr-xr-x root/root etc/ +-rw------- root/root etc/chrony.conf +-rw------- root/root etc/chrony.keys +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/chronyd +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-r-xr-xr-x root/root usr/bin/chronyc +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man1/ +-r--r--r-- root/root usr/man/man1/chrony.1.gz +-r--r--r-- root/root usr/man/man1/chronyc.1.gz +drwxr-xr-x root/root usr/man/man5/ +-r--r--r-- root/root usr/man/man5/chrony.conf.5.gz +drwxr-xr-x root/root usr/man/man8/ +-r--r--r-- root/root usr/man/man8/chronyd.8.gz +drwxr-xr-x root/root usr/sbin/ +-r-xr-xr-x root/root usr/sbin/chronyd +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwxr-xr-x root/root var/lib/chrony/ +drwxr-xr-x root/root var/log/ +drwxr-xr-x root/root var/log/chrony/ diff --git a/chrony/.md5sum b/chrony/.md5sum new file mode 100644 index 000000000..597bbcc9f --- /dev/null +++ b/chrony/.md5sum @@ -0,0 +1,4 @@ +84f76a73dff5a3c9e9f11f3c29a4e93b chrony-1.21.tar.gz +8450f776b8763a17a4e59b0f93aa79f8 chrony.conf +ec43dcf700698a7d2891a1f8504b5e22 chrony.keys +ef4b4ca7c250397656d81a329faf60d2 chronyd diff --git a/chrony/Pkgfile b/chrony/Pkgfile new file mode 100644 index 000000000..674b61c7d --- /dev/null +++ b/chrony/Pkgfile @@ -0,0 +1,23 @@ +# Description: Network time protocol client/server for dial-up client use +# URL: http://chrony.sunsite.dk/index.php +# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de +# Depends on: ncurses, readline + +name=chrony +version=1.21 +release=1 +source=(http://chrony.sunsite.dk/download/$name-$version.tar.gz \ + chronyd chrony.conf chrony.keys) + +build () { + cd $name-$version + ./configure --prefix=/usr + make + make DESTDIR=$PKG install + + rm -r $PKG/usr/doc + + install -d $PKG/var/{lib,log}/chrony + install -D -m 755 $SRC/chronyd $PKG/etc/rc.d/chronyd + install -m 600 $SRC/chrony.* $PKG/etc +} diff --git a/chrony/README b/chrony/README new file mode 100644 index 000000000..41fe836c2 --- /dev/null +++ b/chrony/README @@ -0,0 +1,37 @@ +README for chrony 1.20 + +REQUIREMENTS + +PRE-INSTALL + +POST-INSTALL + +Add up to eight time server of your country to /etc/chrony.conf. +A list of public servers can be found here: + + http://www.eecis.udel.edu/~mills/ntp/clock1a.html + http://www.eecis.udel.edu/~mills/ntp/clock2a.html + + +PRECAUTION + +Remove the both '/sbin/hwclock ...' entries from /etc/rc.shutdown +and /etc/rc. No other software should manipulate the system hardware +clock if chronyd is running. + + +Chrony is a pure Network time protocol (NTP) server, that mean it +provides it's services on port 123/UDP. Utilities like rdate uses +the time protocol on port 37/TCP. To use rdate with chrony you must +add the following line to the /etc/inetd.conf of your chrony server +and run inetd: + + time stream tcp nowait root internal + +To avoid this, I recommend the use of the NTP utility msntp to sync +your clients with your chrony server or better run chrony on all of +your clients. + +The start script /etc/rc.d/chronyd has a online and a offline option. +Use this in your ip-up/ip-down scripts to tell chrony whether we are +online or offline. diff --git a/chrony/chrony.conf b/chrony/chrony.conf new file mode 100644 index 000000000..039bb13ef --- /dev/null +++ b/chrony/chrony.conf @@ -0,0 +1,30 @@ +# +# /etc/chrony.conf +# + +# Change this to some puplic NTP server of your +# country, or the server of your local network +server ntp1.ptb.de minpoll 10 auto_offline +server ntp1.fau.de minpoll 10 auto_offline + +maxupdateskew 100 +commandkey 1 +dumponexit +log measurements statistics tracking +allow 192.168.0/24 +cmdallow 192.168.0/24 +cmdallow 127.0.0.1 + +keyfile /etc/chrony.keys +driftfile /var/lib/chrony/chrony.drift +dumpdir /var/lib/chrony +pidfile /var/run/chronyd.pid +logdir /var/log/chrony + +# Enable this only if you have enhanced real time +# clock support build into your kernel +! log rtc +! rtcdevice /dev/misc/rtc +! rtcfile /var/lib/chrony/chrony.rtc + +# End of file diff --git a/chrony/chrony.keys b/chrony/chrony.keys new file mode 100644 index 000000000..ebed225c0 --- /dev/null +++ b/chrony/chrony.keys @@ -0,0 +1,7 @@ +# +# /etc/chrony.keys +# + +1 my_password + +# End of file
\ No newline at end of file diff --git a/chrony/chronyd b/chrony/chronyd new file mode 100644 index 000000000..53f1e9e86 --- /dev/null +++ b/chrony/chronyd @@ -0,0 +1,40 @@ +#!/bin/sh +# +# /etc/rc.d/chronyd: start/stop the chrony time server +# + +KEY=`sed -n "s/^commandkey *//p" /etc/chrony.conf` +PASSWD=`sed -n "s/^$KEY *//p" /etc/chrony.keys` + +case $1 in +start) + /usr/sbin/chronyd -s -r + ;; +stop) + killall -q /usr/sbin/chronyd + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +online) + /usr/bin/chronyc << EOF > /dev/null + password $PASSWD + online +EOF + ;; +offline) + /usr/bin/chronyc << EOF > /dev/null + password $PASSWD + offline + dump + writertc +EOF + ;; +*) + echo "usage: $0 [start|stop|restart|online|offline]" + ;; +esac + +# End of file |