Bug 72110 - redhat-config-time clobbers existing servers in /etc/ntp.conf
Summary: redhat-config-time clobbers existing servers in /etc/ntp.conf
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-date
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-21 07:03 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-09-05 16:12:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
My laptop's /etc/ntp.conf (3.74 KB, text/plain)
2003-12-19 00:40 UTC, Alexandre Oliva
no flags Details

Description Alexandre Oliva 2002-08-21 07:03:50 UTC
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):


How reproducible:
Always

Steps to Reproduce:
1.add a number of valid server entries to /etc/ntp.conf, by hand
2.run redhat-config-time
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

Additional info:

Comment 1 Brent Fox 2002-08-28 02:49:59 UTC
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:

server   time.nist.gov
server   clock.via.net
server   ntp.lth.se

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:

server   timekeeper.isi.edu
server   clock.via.net
server   ntp.lth.se

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.

Comment 2 Alexandre Oliva 2002-08-30 06:23:59 UTC
The change looks reasonable to me.  Thanks!

Comment 3 Brent Fox 2003-05-25 14:30:14 UTC
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.

Comment 4 Alexandre Oliva 2003-10-18 18:06:30 UTC
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 :-(

Comment 5 Brent Fox 2003-12-18 21:17:05 UTC
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.

Comment 6 Alexandre Oliva 2003-12-19 00:40:58 UTC
Created attachment 96630 [details]
My laptop's /etc/ntp.conf

Here's the requested file.

Comment 7 Brent Fox 2004-03-06 00:15:43 UTC
Ok, system-config-date-1.7.2-1 should now preserve all the other
restrict lines.

Comment 8 Alexandre Oliva 2004-03-19 04:02:32 UTC
I see it still removes the line:

server        127.127.1.0     # local clock

Is this intentional?

Comment 9 Brent Fox 2004-03-23 19:04:53 UTC
Is it necessary for that line to be preserved?

Comment 10 Alexandre Oliva 2004-04-21 13:11:35 UTC
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?

Comment 11 Nils Philippsen 2004-07-21 12:28:35 UTC
Alexandre, does this still happen with a recent system-config-date?


Comment 12 Nils Philippsen 2004-08-17 11:11:58 UTC
Ping?

Comment 13 Alexandre Oliva 2004-08-18 06:33:55 UTC
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 66.187.224.4 mask 255.255.255.255 nomodify notrap noquery
@@ -48 +49 @@
-server 127.127.1.0     # local clock
+server 66.187.224.4


Comment 14 Nils Philippsen 2004-08-18 08:59:11 UTC
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.

Comment 15 Nils Philippsen 2004-09-05 16:12:01 UTC
Should be fixed in 1.7.5-1.


Note You need to log in before you can comment on or make changes to this bug.