[pkg-ntp-maintainers] Bug#613318: ntpdate-debian fails when qualifiers are used
Vincent Lefevre
vincent at vinc17.net
Mon Feb 14 02:39:05 UTC 2011
Package: ntpdate
Version: 1:4.2.6.p2+dfsg-1+b1
Severity: normal
I have the following problem:
$ ntpdate-debian
14 Feb 03:31:19 ntpdate[22720]: no servers can be used, exiting
The details of the failure:
$ sh -x /usr/sbin/ntpdate-debian
+ set -e
+ [ -r /etc/default/ntpdate ]
+ . /etc/default/ntpdate
+ NTPDATE_USE_NTP_CONF=yes
+ NTPSERVERS=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
+ NTPOPTIONS=
+ [ yes = yes ]
+ [ -r /var/lib/ntp/ntp.conf.dhcp ]
+ [ -r /etc/ntp.conf ]
+ file=/etc/ntp.conf
+ break
+ [ -n /etc/ntp.conf ]
+ sed -rne s/^(servers?|peer) ([-_.:[:alnum:]]+).*$/\2/p /etc/ntp.conf
+ grep -v ^127\.127\.
+ NTPSERVERS=-4
-4
-4
-4
+ exec /usr/sbin/ntpdate -4 -4 -4 -4
14 Feb 03:32:21 ntpdate[22737]: no servers can be used, exiting
I have in my /etc/ntp.conf file:
server -4 0.debian.pool.ntp.org iburst
server -4 1.debian.pool.ntp.org iburst
server -4 2.debian.pool.ntp.org iburst
server -4 3.debian.pool.ntp.org iburst
(because my ADSL modem-router doesn't support IPv6), and the script
takes the -4 qualifier instead of the hostname.
I think the sed line should be replaced by:
sed -rne 's/^(servers?|peer) +(-[46] +)?([-_.:[:alnum:]]+).*$/\3/p' /etc/ntp.conf
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ntpdate depends on:
ii dpkg 1.15.8.10 Debian package management system
ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib
ii libcap2 1:2.20-1 support for getting/setting POSIX.
ii libssl0.9.8 0.9.8o-5 SSL shared libraries
ii netbase 4.45 Basic TCP/IP networking system
Versions of packages ntpdate recommends:
ii lockfile-progs 0.1.15 Programs for locking and unlocking
ntpdate suggests no packages.
-- no debconf information
More information about the pkg-ntp-maintainers
mailing list