Modify

Opened 10 years ago

Closed 10 years ago

Last modified 4 years ago

#2292 closed defect (fixed)

ntpclient does not keep running

Reported by: gerti-openwrt@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version:
Keywords: ntpclient Cc:

Description

/etc/hotplug.d/iface/20-ntpclient starts ntpclient with -s which prevents it from running as daemon keeping the clock updated, even if count in the configuration is set to 0.

ntpclient may need to be started with -s first to initially set the clock, then without -s to keep running and keep updating the clock.

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by StHoffmann

Is it prefered for some reason to have all ntpclient calls in /etc/hotplug.d/iface/20-ntpclient? I might be able to provide a fix by using an init script with quite similar structure as in the script above to launch ntpclient with -l option later, i.e. with START=80.

I plan to use an optional parameter for initial frequency offset in the first invocation like

.. -f $frequency -s ..

too by adding another entry in /etc/config/ntpclient.

It may be good to include the rate.awk script for calculation of this frequency in the package or in online documentation as well. On positive response I'd offer to provide an appropriate new or part inside an already exsiting wiki page for how to measure. My reference is another ntpclient docu on the net (have to look it up again).

comment:2 Changed 10 years ago by StHoffmann

There is a separate adjtimex in kamikaze 7.09. After I realized, that ntpclient lacks the "-f" option I used both, ntpclient -s after an adjtimex call in my modified /etc/hotplug.d/iface/20-ntpclient. Seems to work flawlessly so far. The router is up on time and with previous frequency offset right from the start.

My hotplug script uses a new entry "ntpdrift" in /etc/config/ntpclient. It's availability is checked on startup. The entry has to be created manually by now, but it would be even better to automatically set a value from ntpclient after a sufficiently long run. Possible solution:

As long as no offset value is present in the config file, a sensible algorithm would kick in first after a days runtime of ntpclient -l and add a file under /tmp with the current offset, after another day check again. It should try, until it finds, the current value is unchanged since last time and then write this value to the config file. To give it another try, just remove an existing setting. Any different thoughts?

comment:3 Changed 10 years ago by StHoffmann

Patches submitted on openwrt-devel for

initial set of frequency offset with adjtimex
http://lists.openwrt.org/pipermail/openwrt-devel/2008-January/001525.html

ntpclient as background process
http://lists.openwrt.org/pipermail/openwrt-devel/2008-January/001527.html

Comments welcome.

comment:4 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Applied in r10356, enabled in r10357

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.