Red Hat Bugzilla – Bug 72110
redhat-config-time clobbers existing servers in /etc/ntp.conf
Last modified: 2007-11-30 17:10:30 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020809
Description of problem:
If you have a non-trivial /etc/ntp.conf, that lists a set of alternate servers,
after redhat-config-time, you'll have several lines containing the IP address
specified in redhat-config-time.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.add a number of valid server entries to /etc/ntp.conf, by hand
3.list an ntp server
Actual Results: all `server' lines will be replaced
Expected Results: I'd prefer that redhat-config-time added some marker to the
line it adds, so that it can safely replace that single line, instead of
clobbering the user set up. Say:
server <ip or name> # added by redhat-config-time
Ok, I've modified redhat-config-date in two ways.
1) The server that you see in the "NTP server" widget will be the first server
that appears in the file.
2) If you change the NTP server, only the first server will be modified. For
example, if you have in your file:
when you run the program you will see only "time.nist.gov" in the selection
widget. If you were to change the widget to "timekeeper.isi.edu", for example,
your file would now look like:
I think this will get most of what you're asking for. QA, please verify that
this is the behavior with 1.5.2-7.
The change looks reasonable to me. Thanks!
There is a stack of 64 bugs that have been in Modified state for a long period
of time. I am closing these as Rawhide now. If you find that the issue is not
fixed, please reopen this report.
It looks better now, but it still removes any `restrict' entries present in the
file, which renders all the `server' lines it leaves in useless just the same :-(
Can you attach the original ntp.conf file that you are using? That
way I can have the same test case that you are using. I'll see what I
can do about preserving the restrict lines.
Created attachment 96630 [details]
My laptop's /etc/ntp.conf
Here's the requested file.
Ok, system-config-date-1.7.2-1 should now preserve all the other
I see it still removes the line:
server 127.127.1.0 # local clock
Is this intentional?
Is it necessary for that line to be preserved?
What if the local host has a reliable clock source? Taking this out
would break it, I suppose. Besides, consider that someone might have
a good reason to have kept the line there, maybe even added it after
something else removed it (system-config-time :-); removing it (again)
would probably be wrong. It's not like the line hurts, is it?
Alexandre, does this still happen with a recent system-config-date?
Sorry for the delay. Yes, it still happens. Here are the changes
system-config-date makes to my ntp.conf:
# diff -U0 ntp.conf.orig ntp.conf
--- ntp.conf.orig 2004-07-15 00:55:28.000000000 -0300
+++ ntp.conf 2004-08-18 03:34:21.650296934 -0300
@@ -2,0 +3 @@
+restrict 220.127.116.11 mask 255.255.255.255 nomodify notrap noquery
@@ -48 +49 @@
-server 127.127.1.0 # local clock
OK. Due to other stuff (bug #115148 for instance) I plan to revamp the
NTP dialog and code a bit. I wanted to let users configure more than
one NTP server anyway, I guess additionally having a checkbox "Use
local time source" wouldn't hurt.
Should be fixed in 1.7.5-1.