On Tue, Feb 24, 2009 at 03:48:03PM -0800, Jack Bates wrote:
> On Thu, 2009-02-19 at 22:35 +0100, Kurt Roeckx wrote:
> > He says he somehow ended up with a blank /etc/ntp.conf file, which
> > shouldn't happen.
> 
> Thanks Kurt, on further investigation I realize that the ntpdate package
> does not distribute an ntp.conf file, blank or otherwise. I think the
> blank ntp.conf file I observe is a symptom of bug #397648, which has
> been forwarded upstream:
> http://bugzilla.gnome.org/show_bug.cgi?id=449267
> 
> Unfortunately neither bug #397648 nor the upstream bug show any recent
> activity : (
> 
> After deleting the blank ntp.conf file and without manually
> reconfiguring /etc/default/ntpdate, I can run ntpdate-debian

I sent a patch to the upstream bug, which I've also attached here.  See
also #606107, which I just filed on ntp with some tweaks to work around
this bug.  Applying both these sets of changes should get rid of this
problem.

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]
>From 126b6d57e28f4b626e61ae520c24c08a31849bfa Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwat...@canonical.com>
Date: Mon, 6 Dec 2010 11:40:42 +0000
Subject: [PATCH] bgo#449267 - Don't create empty NTP configuration files

If /etc/ntp.conf (or the platform equivalent) doesn't exist, then merely
synchronising the clock in time-admin would create it as an empty file.
This caused other time syncing problems later (see e.g.
https://bugs.launchpad.net/bugs/83604).
---
 Time/NTP.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Time/NTP.pm b/Time/NTP.pm
index e7be3a9..c3106bb 100644
--- a/Time/NTP.pm
+++ b/Time/NTP.pm
@@ -75,6 +75,8 @@ sub ntp_conf_replace
   my ($line_key, $val, $rest);
   my ($n, $ret);
 
+  return if !&Utils::File::exists ($file);
+
   &Utils::Report::enter ();
   &Utils::Report::do_report ("replace_split", $key, $file);
 
-- 
1.7.2.3

Reply via email to