[pkg-ntp-maintainers] Bug#387889: ntpdate: error message also seen
at boot time
Chris Moore
dooglus at gmail.com
Tue Sep 19 21:18:26 UTC 2006
Package: ntpdate
Version: 1:4.2.2+dfsg.2-2
Followup-For: Bug #387889
I just spent a while tracking down the source of this bug, only to
find it was already reported. I saw the error message from sed at
boot time - I wasn't running ifup manually, so it's less than obvious
which script is causing the error message.
Here's a patch to fix it:
------------------------------------------------------------------------
--- /etc/default/ntpdate.old 2006-09-19 23:11:25.000000000 +0200
+++ /etc/default/ntpdate 2006-09-15 11:30:00.000000000 +0200
@@ -1,7 +1,7 @@
# Servers to check (Separate multiple servers with spaces.)
# This code will take the server list from /etc/ntp.conf, from package ntp,
# so you only have to keep it in one place.
-NTPSERVERS=$(sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' /etc/ntp.conf 2>/dev/null | grep -v '^127\.127\.')
+NTPSERVERS=$(sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' /etc/ntp.conf | grep -v '^127\.127\.' 2>/dev/null)
if [ -z "$NTPSERVERS" ]; then
NTPSERVERS="0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org"
fi
------------------------------------------------------------------------
Although maybe it would be better to explicitly check that
/etc/ntp.conf exists and is readable rather than just redirecting the
error to /dev/null.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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.8c-1 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