e6b0103b8c
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
23 lines
314 B
Text
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
|
|
}
|