Suggest to improve the sysfixtime code

In the sysfixtime code, /dev/rtc0 is applicable, but many machines do not have this device, so the initialization after the system restarts must rely on the maxtime function, so it is recommended to add a section of code to the stop code to make the time initialization more accurate. for example

stop() {
date +%s > /etc/rtc0 or
touch /etc/rtc0

pr's can be submitted to github or patches to the mailing list...

excessive writes to /etc/ increase the chances of flash failure...

1 Like

Write in the stop code segment, only when sysfixtime is stopped, will the write operation be triggered, but in general, only when the restart is started, sysfixtime will be stopped, so the writing frequency is very low and it will not burden the hardware much.

There is no need need to create a new file: touch /etc/banner would work just fine.

It is true that there is no need to create a new file. The purpose of creating a new file here is to distinguish it and to write some other related information.