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
13 lines
261 B
Bash
13 lines
261 B
Bash
#!/bin/sh
|
|
|
|
# remove offset file and directory
|
|
offset_file="/var/cache/swclock-offset/offset-storage"
|
|
offset_directory="/var/cache/swclock-offset"
|
|
|
|
if [ -f $offset_file ]; then
|
|
rm $offset_file
|
|
fi
|
|
|
|
if [ -d $offset_directory ]; then
|
|
rmdir $offset_directory
|
|
fi
|