installiere von der DLD-Distribution das Paket XNTP. Es läuft bei uns prima und mach genau das
gewünschte.
In /etc/init.d erzeuge die Datei xntpd.init, die wie folgt aussieht:
#!/bin/sh
#
# xntpd This shell script takes care of starting and stopping
# xntpd.
#
# Modified: Ngo Than <than@delix.de> for DLD
# Date: 05.03.1997
#
# Source function library.
[ -f /etc/init.d/functions ] || exit 0
.. /etc/init.d/functions
# Source networking configuration.
[ -f /etc/sysconfig/network ] || exit 0
.. /etc/sysconfig/network
# Source runservice
[ -f /etc/sysconfig/runservices ] && . /etc/sysconfig/runservices
[ "$XNTPD" = "yes" ] || exit 0
# Check that networking is up.
[ "$NETWORKING" = "yes" ] || exit 0
[ -f /usr/sbin/xntpd ] || exit 0
[ -f /usr/sbin/ntpdate ] || exit 0
# See how we were called.
case "$1" in
start)
# # Adjust time to make life easy for xntpd
echo -n "Syncing time for xntpd"
/usr/sbin/ntpdate -o 1 bernina.ethz.ch ntp2a.mcc.ac.uk ntp2b.mcc.ac.uk
# Start daemon.
echo -n "Starte xntpd: "
daemon xntpd -l /var/log/xntpd
echo
;;
stop)
# Stop daemon.
echo -n "Stoppe xntpd: "
killproc xntpd
echo
;;
*)
echo "Usage: xntpd.init {start|stop}"
exit 1
esac
In der Datei /etc/sysconfig/runservices sollte folgender Eintrag stehen:
XNTPD=yes
Und schließlich die Konfigurationsdatei /etc/ntp.conf:
# /etc/ntp.conf
# xntpd configuration info
# This config does not include any actual time servers
# Check http://www.eecis.udel.edu/~mills/ntp/servers.html for actual
# time servers and etiquette on using them.
# Place time server entries here
server bernina.ethz.ch # stratum 2
# server chime1.surfnet.nl # stratum 2
server ntp2a.mcc.ac.uk # stratum 2
server ntp2b.mcc.ac.uk # stratum 2
# A fake local server for when time servers are unavailable
# server 127.127.1.0
# fudge 127.127.1.0 stratum 10
# Where to store stats on click drift
driftfile /var/run/ntp.drift
Starte das Ganze mit /etc/init.d/xntpd.init start
Das wars.
- Werner -
-- --------------------------------------- Werner Modenbach modenbach@alc.de ALC Computertechnik GmbH http://www.alc.de