[chrony-users] systemd-time-wait-sync and chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


I use chrony to synchronize an embedded system’s clock. There are systemd-controlled services on the system that I’d like to configure to wait until the system clock is synchronized.

I can order these services to start after time-sync.target, but I need some other service to start *before* time-sync.target and delay it until the clock is synchronized.

There is systemd-time-wait-sync.service for exactly this purpose:

https://www.freedesktop.org/software/systemd/man/systemd-time-wait-sync.service.html#

However, it is designed for systemd-timesyncd to send it a signal directly when the clock is synchronized.

As a fallback for alternatives like chrony, it does some trick where it creates a timer which the kernel cancels when the clock is synchronized. But the documentation cautions that this is not necessarily reliable.

https://github.com/systemd/systemd/pull/8494/files

Does this work well with chrony? Or is there a better way to set up time-sync.target?


Thanks,
Ryan


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/