You are not logged in.

#1 2004-03-30 20:48:43

fita
Member
Registered: 2003-10-19
Posts: 3

ntp.conf changes back every restart.

I start ntpd in the daemons section of rc.conf, and if i change the ntp.conf file and do "/etc/rc.d/ntpd restart" everything works well, the config file remains OK, but the next time I reboot (even if it is the next thing i do) the ntp.conf file change back.

I don't know why, but it seems that I am the only one that have that problem, beacouse I did not find anything like that in the forum, so I supose that it may be something that i did wrong.

Sorry about my poor english and thanks in advance.

Offline

#2 2004-03-31 00:30:44

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: ntp.conf changes back every restart.

Dhcp is doing it.  Edit /etc/rc.d/network and add -N to the line that starts with 'dhcpcd -t 10'.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#3 2004-03-31 06:36:26

fita
Member
Registered: 2003-10-19
Posts: 3

Re: ntp.conf changes back every restart.

Thanks I didn't know it. This afternoon I will try it

Offline

#4 2004-09-05 14:49:09

Takaitra
Member
From: Minnesota
Registered: 2004-05-24
Posts: 10

Re: ntp.conf changes back every restart.

I just ran into this same problem and was glad to find the solution here. I never would have thought to look at dhcpcd. I also added "-R" to the command line so my custom resolv.conf file won't be overwritten on boot.

Offline

#5 2004-09-21 18:13:18

khazdar
Member
From: ohio
Registered: 2003-11-06
Posts: 123

Re: ntp.conf changes back every restart.

Where in the line do I add the -N too? Does it matter? I added the -N at the end of the line and rebooted.. and this did not perserve my ntp.conf file.

Offline

#6 2004-09-21 20:12:10

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: ntp.conf changes back every restart.

probably before the "10" as many apps do not accept additional arguments after the input source.


AKA uknowme

I am not your friend

Offline

#7 2006-02-22 02:28:58

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: ntp.conf changes back every restart.

YARRRR!!!  I've had this happen two times now and thought I was just going crazy!  I spent a ton of time, last time around, reading all I could about NTP and all the options, but never backed up my <code>.conf</code> file once I had it perfected.  I thought it would be fine just protecting it in <code>pacman.conf</code>, but now I'll know better...

Does anyone know why <code>ntp.conf</code> would ever need to be replaced by DHCP?  I've already started writing a better NTP guide to fill in some of the information on the Wiki's stub article, and will now make sure to add the <code>dhcpcd -N</code> information in there.  Talk about frustrating!  :x

Offline

#8 2007-04-28 21:59:18

dtandersen
Member
Registered: 2007-01-30
Posts: 41

Re: ntp.conf changes back every restart.

I just had the same issue.  Add -N to DHCPCD_ARGS in /etc/conf.d/dhcpcd as documented in http://wiki.archlinux.org/index.php/NTP

Offline

#9 2007-04-28 23:35:57

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: ntp.conf changes back every restart.

I have had the problem in the past. I also used the suggestions inhttp://wiki.archlinux.org/index.php/NTP to no avail, so tired of dealing with the problem I created my own solution.
This is what I did and ** it works **
1. Create the ntp.conf file the way you like it.
2. Name it myntp.conf and store it  in /etc/myntp.conf
3. Open /etc/rc.local and enter the following:

cp /etc/myntp.conf /etc/ntp.conf

4. Done.

Now when the network replaces your ntp.conf at boot your rc.local will "put it back". wink

Hope this helps.

R.

Offline

#10 2007-04-29 14:15:56

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: ntp.conf changes back every restart.

elasticdog wrote:

Does anyone know why ntp.conf would ever need to be replaced by DHCP?

I think it is usual to not have every computer on your network hitting an external time server -- you would usually have one system on your network (probably the same machine which is your gateway / dhcp server) getting its time from an external source, and then also acting as a local time server for the rest of the machines on your network. So the dhcp server tells the dhcp clients where to get their time info, and dchp rewrites the clients ntp.conf.

Offline

Board footer

Powered by FluxBB