ntpdate-like functionality in ntpd

Rich Felker dalias at libc.org
Tue Jan 27 21:37:41 UTC 2015


On Tue, Jan 27, 2015 at 10:26:47PM +0100, Denys Vlasenko wrote:
> On Tue, Jan 27, 2015 at 7:27 PM, Guillermo Rodriguez Garcia
> <guille.rodriguez at gmail.com> wrote:
> > Hello all,
> >
> > Is there a way to make ntpd work just like ntpdate (just use the first
> > response received to set the time)? This is to set the approximate
> > time at boot as quickly as possible before starting other time sensitive
> > services.
> >
> > The closest I can get is ntpd -nqp <server> but this seems to need
> > 5 valid samples in order to set the time.
> 
> Would it work for you if you simply background it
> and let it do its work in parallel with the rest of the boot?

I doubt having the boot process continue with the wrong time would be
acceptable. File timestamps will be wrong until the background process
completes. You really want to wait synchronously for an answer.

Rich


More information about the busybox mailing list