[pkg-ntp-maintainers] Bug#387889: Little error in /etc/default/ntpdate

Yannick Roehlly yannick.roehlly at free.fr
Sun Sep 17 10:03:29 UTC 2006


Package: ntpdate
Version: 1:4.2.2+dfsg.2-2
Severity: minor

There is a little error in the ntp.conf parsing command in
/etc/default/ntpdate:

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

The error redirection (2>/dev/null) applies to grep whereas it's sed
that would generate en error if ntp.conf is not present.

Thus, and ifup generates a "sed: can't read /etc/ntp.conf: No such file 
or directory"

I think the author of the command wanted to do a:

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

which works as expected.

Yannick

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (300, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages ntpdate depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libcap1                      1:1.10-14   support for getting/setting POSIX.
ii  libssl0.9.8                  0.9.8b-3    SSL shared libraries
ii  lsb-base                     3.1-15      Linux Standard Base 3.1 init scrip
ii  netbase                      4.26        Basic TCP/IP networking system

ntpdate recommends no packages.

-- no debconf information




More information about the pkg-ntp-maintainers mailing list