[pkg-ntp-maintainers] Bug#389132: ntpdate init script search for
/etc/ntp.conf (patch)
Jack Grahams
jackgrahams at inbox.com
Sun Sep 24 15:26:57 UTC 2006
-----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-----
-------------- next part --------------
--- /etc/default/ntpdate 2006-09-24 16:08:51.000000000 +0100
+++ /etc/default/ntpdate.new 2006-09-24 16:09:10.000000000 +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
-------------- next part --------------
--- 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
More information about the pkg-ntp-maintainers
mailing list