pmaports/main/swclock-offset/swclock-offset-boot.initd
Jakob Hauser e6b0103b8c
main/swclock-offset: new package (MR 2191)
Some devices have a working but non-writable real-time clock (RTC).
This package contains two shell scripts: One writes the offset between
'hwclock' and 'swclock' to a file at shutdown, another one reads the
offset from the file at boot and sets the 'swclock'. This way the system
time in userspace is kept in present time.

[ci:skip-build] already built successfully in CI
2021-06-08 19:45:11 -07:00

23 lines
314 B
Text

#!/sbin/openrc-run
# To avoid time inconsistency at filesystems check, the system time
# shall be set before "fsck".
description="Setting the system time according to an offset file."
depend()
{
before fsck
}
start()
{
ebegin "Setting system time"
/sbin/swclock-offset-boot
eend $?
}
stop()
{
return 0
}