[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2129: xntp startup should call ntpdate first

Package: xntp
Version: 3.4x-2

The current startup file /etc/init.d/xntp just launches xntpd.  It should
first run ntpdate against one or more of the servers/peers indicated in the
ntp.conf file to ensure that the local clock is approximately right.  Otherwise
xntpd will exit fairly quickly complaining that the clock is so wrong that
it won't change it.

My quick fix looks like:

RCS file: RCS/xntp,v
retrieving revision 1.1
diff -u -r1.1 xntp
--- xntp        1996/01/13 19:06:25     1.1
+++ xntp        1996/01/13 19:07:22
@@ -3,6 +3,9 @@

 case "$1" in
+    # get us somewhere near the right time first...
+    /usr/sbin/ntpdate wwvb.col.hp.com
+    # then launch the daemon
     start-stop-daemon --start --verbose --exec /usr/sbin/xntpd

But, it would obviously be better to either customize this file at the same
time that /etc/ntp.conf is being created, or have this file parse the ntp.conf
file extracting the host list to feed ntpdate from the listed server and peer


Reply to: