On Thu, Apr 20, 2017 at 12:33:29PM -0400, Robert Moskowitz wrote:
This is on Centos7 on arm:
In my continuing journey to run a armv7 server with no battery clock, I have
been strongly advised on the postfix list that it should NOT start until the
system time is after the create time of the running version of postfix.
The -s option would help with that, but the improved behavior which
restores time from the driftfile when there is no RTC was added in a
newer version than is currently available in CentOS.
Adding chronyd.service to the After statement would only delay postfix until
chronyd started, not until it set the time (and what if the network was down
at startup time?).
How might I add a ExecStartPre clause that would delay postfix until the
system time was right?
The recommended way to delay start of a service until the clock is
synchronized is to add "After=time-sync.target" to its unit file and
enable the chrony-wait service. It uses the chronyc waitsync command
to delay the time-sync target.