Debian Bug report logs - #382311
grepping of ntp.conf gets refclocks, misses peers

version graph

Package: ntpdate; Maintainer for ntpdate is Debian NTP Team <>; Source for ntpdate is src:ntp.

Reported by:

Date: Thu, 10 Aug 2006 08:03:10 UTC

Severity: normal

Found in version 4.2.2+dfsg-2.1

Fixed in version ntp/1:4.2.2+dfsg.2-2

Done: Peter Eisentraut <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Debian NTP Team <>:
Bug#382311; Package ntpdate. Full text and rfc822 format available.

Acknowledgement sent to
New Bug report received and forwarded. Copy sent to Debian NTP Team <>. Full text and rfc822 format available.

Message #5 received at (full text, mbox):

Subject: grepping of ntp.conf gets refclocks, misses peers
Date: 10 Aug 2006 03:51:10 -0400
Package: ntpdate
Version: 4.2.2+dfsg-2.1

The relevant lines from my ntp.conf file:
peer key 101 minpoll 4 iburst
server minpoll 1 maxpoll 4 iburst

Result in ntpdate trying uselessly to sync up to
while failing to query the perfectly good server at

It's not causing me any problems, but perhaps the script could
be made fractionally smarter.

Something like

sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' /etc/ntp.conf | grep -v '^127\.127\.'

or even (allowing alternate whitespace and making the server name regexp
a bit stricter)

sed -rne 's/^(server|peer)[ \t]+([_[:alnum]][-_.[:alnum:]]*)[ \t].*$/\2/p' /etc/ntp.conf | grep -v '^127\.127\.'

Alternatively, perhaps if there are both "peer" and "server" lines,
peers should be given absolute precedence...

# Servers to check (Separate multiple servers with spaces.)
# This code will take the server list from /etc/ntp.conf, if that exists,
# so you only have to keep it in one place.

# Peers (if any) are most trusted, and preferred.
NTPSERVERS=$(sed -rne 's/^peer[ \t]([-_.[:alnum:]]+)[ \t].*$/\1/p' /etc/ntp.conf 2>/dev/null)
# Then any configured servers
if [ -z "$NTPSERVERS" ]; then
	NTPSERVERS=$(sed -rne 's/^server[ \t]([-_.[:alnum:]]+)[ \t].*$/\1/p' /etc/ntp.conf 2>/dev/null)
# A good fallback list if /etc/ntp.conf is missing or unhelpful
if [ -z "$NTPSERVERS" ]; then

Information forwarded to, Debian NTP Team <>:
Bug#382311; Package ntpdate. Full text and rfc822 format available.

Acknowledgement sent to Peter Eisentraut <>:
Extra info received and forwarded to list. Copy sent to Debian NTP Team <>. Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Peter Eisentraut <>
Subject: Re: [pkg-ntp-maintainers] Bug#382311: grepping of ntp.conf gets refclocks, misses peers
Date: Sat, 19 Aug 2006 00:34:10 +0200
The thing is, installing ntp and ntpdate at the same time is near 
completely useless these days, so I'm leaning toward ripping out that 
logic again.  Otherwise we'll implement a complete ntp.conf parser 
before long and make people believe that this would actually be useful.

Tags added: pending Request was from Peter Eisentraut <> to Full text and rfc822 format available.

Reply sent to Peter Eisentraut <>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to
Bug acknowledged by developer. Full text and rfc822 format available.

Message #17 received at (full text, mbox):

From: Peter Eisentraut <>
Subject: Bug#382311: fixed in ntp 1:4.2.2+dfsg.2-2
Date: Sat, 16 Sep 2006 09:23:37 -0700
Source: ntp
Source-Version: 1:4.2.2+dfsg.2-2

We believe that the bug you reported is fixed in the latest version of
ntp, which is due to be installed in the Debian FTP archive:

  to pool/main/n/ntp/ntp-doc_4.2.2+dfsg.2-2_all.deb
  to pool/main/n/ntp/ntp-refclock_4.2.2+dfsg.2-2_all.deb
  to pool/main/n/ntp/ntp-simple_4.2.2+dfsg.2-2_all.deb
  to pool/main/n/ntp/ntp_4.2.2+dfsg.2-2.diff.gz
  to pool/main/n/ntp/ntp_4.2.2+dfsg.2-2.dsc
  to pool/main/n/ntp/ntp_4.2.2+dfsg.2-2_i386.deb
  to pool/main/n/ntp/ntpdate_4.2.2+dfsg.2-2_i386.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Peter Eisentraut <> (supplier of updated ntp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA1

Format: 1.7
Date: Fri, 15 Sep 2006 11:24:09 +0200
Source: ntp
Binary: ntp-simple ntp-refclock ntp-doc ntpdate ntp
Architecture: source all i386
Version: 1:4.2.2+dfsg.2-2
Distribution: unstable
Urgency: medium
Maintainer: Debian NTP Team <>
Changed-By: Peter Eisentraut <>
 ntp        - Network Time Protocol daemon and utility programs
 ntp-doc    - Network Time Protocol documentation
 ntp-refclock - transition package
 ntp-simple - transition package
 ntpdate    - client for setting system time from NTP servers
Closes: 56499 245338 305864 312576 321759 375280 382311 382543 383212 383666 384857 386323 387002
 ntp (1:4.2.2+dfsg.2-2) unstable; urgency=medium
   [ Branden Robinson ]
   * Soften ntp binary package's Conflicts and Replaces relationships with
     ntp-{refclock,server,simple} so that they are unversioned; a versioning
     expression is unnecessary as none of these exist now as dummy packages
     (and do not need to, as all depended directly or transitively on ntp
     itself).  State that ntp Provides the three merged packages, so that
     packages depending on them are not spuriously blocked from upgrading
     before their dependencies are manually changed. (closes: #383212)
   [ Peter Eisentraut ]
   * Updated README.Debian's and package descriptions, reflecting that
     ntpdate is no longer necessary when ntp is installed
   * npdate is no longer started from an init script but instead by ifup
     (closes: #56499, #245338, #312576)
   * Run ntpdate from ifup in the background (closes: #321759, #375280,
   * Cleaned out package relationships with long-obsolete packages
   * Updated standards version
   * Also parse peer lines in ntp.conf from ntpdate.default (closes: #382311)
   * Added pointer in ntpdate.default where to find ntp.conf (closes: #386323)
   * Updated logcheck rules (closes: #305864)
   [ Julien BLACHE ]
   * debian/control:
     + Add ntp-refclock and ntp-simple transition packages (closes: #384857).
   * debian/ntp.init:
     + Remove adduser call from initscript (closes: #383666).
   [ Petter Reinholdtsen ]
   * Fixed init script LSB header dependency information (closes: #387002)
 9553a9b41ba5f5c3ba174ac5592efc1b 841 net optional ntp_4.2.2+dfsg.2-2.dsc
 6b9241afc047363e3bcf11b25af4e561 173994 net optional ntp_4.2.2+dfsg.2-2.diff.gz
 f986aa4ae857f41a6bce469feed07815 891756 doc optional ntp-doc_4.2.2+dfsg.2-2_all.deb
 c44b4f1dadf7ed82bc43ffdc34068c83 27128 net optional ntp-simple_4.2.2+dfsg.2-2_all.deb
 1fefd26e9fc228e9e6d6c6e39f64c4ee 27130 net optional ntp-refclock_4.2.2+dfsg.2-2_all.deb
 f2fc5f5531c9c76187510f94de6d0b11 321010 net optional ntp_4.2.2+dfsg.2-2_i386.deb
 0ff308d22b0dda454023610ce77e7520 55902 net optional ntpdate_4.2.2+dfsg.2-2_i386.deb

Version: GnuPG v1.4.5 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Sun, 24 Jun 2007 14:42:52 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Thu Apr 17 10:15:26 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.