Bug#389132: ntpdate init script search for /etc/ntp.conf

2006-09-24 Thread Eric Valette
Package: ntpdate
Version: 1:4.2.2+dfsg.2-2
Severity: normal

etc/init.d/ntpdate restart
sed: can't read /etc/ntp.conf: No such file or directory
Running ntpdate to synchronize clockdone

-- System Information:
Debian Release: testing/unstable
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: 
LC_ALL set to [EMAIL PROTECTED])

Versions of packages ntpdate depends on:
ii  libc62.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-1SSL shared libraries
ii  lsb-base 3.1-15  Linux Standard Base 3.1 init scrip
ii  netbase  4.26Basic TCP/IP networking system

ntpdate recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#389132: [pkg-ntp-maintainers] Bug#389132: ntpdate init script search for /etc/ntp.conf (patch)

2006-09-24 Thread Peter Eisentraut
Jack Grahams wrote:
 Anyway, It's easy to solve, with a minor edit to /etc/default/ntpdate
 and I've included a patch to do this (ntpdate.default.patch).

That patch is certainly wrong.  Why would ntp.conf be executable?

Anyway, it's fixed already for the next version.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#389132: ntpdate init script search for /etc/ntp.conf (patch)

2006-09-24 Thread Jack Grahams
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I had this problem too; it actually caused my ppp0 interface to fail to
start on boot (although that is most likely specific to my local settings!).

Anyway, It's easy to solve, with a minor edit to /etc/default/ntpdate
and I've included a patch to do this (ntpdate.default.patch).

I've also included a patch to fix this in the source package
(ntpdate.srcpkg.patch).

Hope this helps,
Jack

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFFqN67l4lrvUNGf4RAlbFAKCD7LWH+x26DZis2lk1/BAr0YnTZQCbByVu
GY0gTHykgmmhObJf6gtRNjk=
=HGE3
-END PGP SIGNATURE-
--- /etc/default/ntpdate2006-09-24 16:08:51.0 +0100
+++ /etc/default/ntpdate.new2006-09-24 16:09:10.0 +0100
@@ -1,7 +1,10 @@
 # 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 | grep -v '^127\.127\.' 2/dev/null)
+if [ -x /etc/ntp.conf ]; then
+   NTPSERVERS=$(sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' 
/etc/ntp.conf | grep -v '^127\.127\.' 2/dev/null)
+fi
+
 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
--- ntp-4.2.2+dfsg.2~/debian/ntpdate.default
+++ ntp-4.2.2_dfsg.2/debian/ntpdate.default
@@ -1,7 +1,10 @@
 # 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 | grep -v '^127\.127\.' 2/dev/null)
+if [ -x /etc/ntp.conf ]; then
+   NTPSERVERS=$(sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' 
/etc/ntp.conf | grep -v '^127\.127\.' 2/dev/null)
+fi
+
 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