Re: [chrony-users] Delaying postfix until chronyd gets the time |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Delaying postfix until chronyd gets the time
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 20 Apr 2017 19:03:39 +0200
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F0A15C04D2AC
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F0A15C04D2AC
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.
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.