[systemd-devel] How to ensure a systemd unit waits for ntpd to sync before starting?

Lennart Poettering lennart at poettering.net
Tue Apr 2 08:18:23 UTC 2019


On Di, 02.04.19 10:05, Reindl Harald (h.reindl at thelounge.net) wrote:

> Am 02.04.19 um 09:44 schrieb Debraj Manna:
> >
> >   We have a service that starts at boot. We need to ensure it doesn't
> >   start until the system clock has been synchronized via ntp. The
> >   machines are usingĀ |ntpd|
>
> After=ntpd.service
> Wants=ntpd.service

I don't know ntpd. But I surely hope that just starting ntpd will
delay boot-up until a sync is reached. If it does, then this would be
a bug and a misdesign in the ntpd unit files.

(See my other mail how ntpd should do this correctly.)

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list