[PATCH] bgo#449267 - Don't create empty NTP configuration files
Colin Watson
cjwatson at canonical.com
Mon Dec 6 11:40:42 UTC 2010
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
--OgqxwSJOaUobr8KG--
More information about the pkg-gnome-maintainers
mailing list