Raspberry Pi: Clock skew messages on startup; simple fix
The Raspberry Pi has no hardware clock, so it throw warnings and errors on OpenRC startup, even when using swclock service instead of hwclock.
A simple fix make OpenRC happy and let those messages vanish:
Create an empty file /etc/init.d/.use-swclock to signal usage of this hack (just to be able to disable on systems with hardware clock).
Add the following snippet in /lib/rc/sh/init.sh, just after setting up /proc:
if [ -e /etc/init.d/.use-swclock ]; then
… with this added, OpenRC set the system clock to the date/time of /etc/init.d (the last modification time), then use this date to create the /run directories. As the time of the dependency tree /run/openrc/deptree is now not below the date of /etc/init.d we are gone and OpenRC is happy.
The clock shall then still be set with either swclock service or an NTP service.
The hack just make OpenRC happy and suppresses the confusing “Clock skew” messages. As far as I can tell, it has no other impacts.
(from redmine: issue id 8093, created on 2017-11-02)