daeb5beb8f
Commit cc8695 changed the way timestamps were handled and added some extra munging to be able to compare them reliably. This change makes the timestamp value the same everywhere and simplifies how the check to set the system clock based on the timestamp is done. Also, if the value stored in /etc/timestamp is newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day. (From OE-Core rev: 5aab6653c9afa05e7c1b3ccd6bd34aec05c2a6f8) Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 lines
321 B
Bash
14 lines
321 B
Bash
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: save-rtc
|
|
# Required-Start:
|
|
# Required-Stop: $local_fs hwclock
|
|
# Default-Start: S
|
|
# Default-Stop: 0 6
|
|
# Short-Description: Store system clock into file
|
|
# Description:
|
|
### END INIT INFO
|
|
|
|
# Update the timestamp
|
|
date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
|