[Arm-dev] Customizing Chronyd for no battery

Fri Apr 21 19:30:24 UTC 2017
Robert Moskowitz <rgm at htt-consult.com>

I have updated:

http://medon.htt-consult.com/Centos7-armv7.html

With the Chronyd caveats and enabling rgn-tools.

On 04/21/2017 09:03 AM, Robert Moskowitz wrote:
> Fellow armv7-without-rtc-battery users.  Maybe you have already 
> learned this, but I THINK I have completed my education on this thanks 
> to Miroslav Lichvar on the Chrony list.
>
> There are two issues here:  It takes time for chronyd to set the 
> system time.  And if it fails to reach the ntp servers, well, it 
> failed to set the time.
>
> For the first, we need to delay some services from starting until 
> chronyd is successful.  Postfix is one of them.  So we need the 
> following commands:
>
> systemctl enable chrony-wait
> systemctl start chrony-wait
> sed -i '/^After=/ s/$/ time-sync.target/w /dev/stdout' 
> /usr/lib/systemd/system/postfix.service
>
> There are some possible instances where you also want to do this to 
> httpd.service, but I have been advised on the postfix list NOT to run 
> postfix if the systemtime is earlier than the postfix build date
>
> $ postconf -dh mail_release_date
> 20130622
>
> Plus the postfix.service runs aliases.db which will mess up your 
> aliases.db timestamp.
>
> Next there is that pesky issue about what if no ntp servers reached?
>
> First:
>
> cat <<EOF>/etc/sysconfig/chronyd || exit 1
> OPTIONS=" -s"
> EOF
>
> Since Centos7 has Chronyd 2.1.1, not 2.2, we have extra work to do in 
> chronyd.conf:
>
> cat <<EOF>>/etc/chrony.conf || exit 1
> rtcdevice /dev/doesnotexist
> EOF
>
>
> I am adding this to my basic server howto page.
>
>
> _______________________________________________
> Arm-dev mailing list
> Arm-dev at centos.org
> https://lists.centos.org/mailman/listinfo/arm-dev
>