[CentOS] What besides Postfix should not start until system time set?

Robert Moskowitz rgm at htt-consult.com
Fri Apr 21 13:38:47 UTC 2017



On 04/21/2017 09:25 AM, Denniston, Todd A CIV NAVSURFWARCENDIV Crane, 
JXVS wrote:
> ________________________________________
> From: Robert Moskowitz [rgm at htt-consult.com]
> Sent: Thursday, April 20, 2017 5:00 PM
> To: CentOS mailing list
> Subject: [CentOS] What besides Postfix should not start until system time       set?
>> So I have learned that Postfix should delay until Chronyd has moved the
>> system time from 0 to current.
> Something you might consider to make the time delta _less_ drastic, is to create a service which on system shutdown touches a file {in /etc/} and on boot early in the start-up {make some other services depend on it} checks to see if the system date&time is before the time on that file, if it is then use the time stamp {+ a few sec} on the file to set the current time.  That way time would at least move forward.
>
> in the olden days we used to use `hwclock --badyear` mitigate part of it. perhaps you could extend hwclock for --dead-batteries and make it easier for every one  with an arm {assuming hwclock is still used in the boot process to pull the initial time from the clock}. :)
>
> Even when this disclaimer is not here:
> I am not a contracting officer. I do not have authority to make or modify the terms of any contract.

Miroslav has been a great help over on the chronyd list.  I have learned 
to add the -s option to chronyd and point the rtcdevice to nothing so 
that the Centos version of Chronyd, 2.1.1, will read the timestamp from 
the driftfile if no ntp respose:

cat <<EOF>/etc/sysconfig/chronyd || exit 1
OPTIONS=" -s"
EOF

cat <<EOF>>/etc/chrony.conf || exit 1
rtcdevice /dev/doesnotexist
EOF

With chronyd 2.2, you only need the "-s" option.





More information about the CentOS mailing list