summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0/save-rtc.sh
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-09-02 14:18:47 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-09-02 14:18:47 +0000
commit2b79934c4f4dc62f043534729102c9dd2e211da7 (patch)
treebff7797eb444b9a6b55b2f42fcca4db0ccfdd1ae /packages/initscripts/initscripts-1.0/save-rtc.sh
parentada308cef40f274bc1f93fd90a609676ae24632b (diff)
initscipts: Improve RTC handling so /etc/timestamp is used if its timestamp is 1 day or more greater than the existing time. Also set the timestamp on halt/reboot so devices without a hardware RTC (or with a broken RTC like the PXA) can benefit.
Diffstat (limited to 'packages/initscripts/initscripts-1.0/save-rtc.sh')
-rw-r--r--packages/initscripts/initscripts-1.0/save-rtc.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/initscripts/initscripts-1.0/save-rtc.sh b/packages/initscripts/initscripts-1.0/save-rtc.sh
index 4e0e270701..e786073051 100644
--- a/packages/initscripts/initscripts-1.0/save-rtc.sh
+++ b/packages/initscripts/initscripts-1.0/save-rtc.sh
@@ -1,3 +1,5 @@
#! /bin/sh
-#FIXME read timestamp handling for systems where RTC doesn't survive a reboot
/etc/init.d/hwclock.sh stop
+
+# Update the timestamp
+date +%2m%2d%2H%2M%Y > /etc/timestamp