]> git.openpandora.org Git - openembedded.git/commitdiff
initscripts: first steps towards working together with RTC
authorMichael Lauer <mickey@vanille-media.de>
Tue, 14 Aug 2007 18:13:17 +0000 (18:13 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Tue, 14 Aug 2007 18:13:17 +0000 (18:13 +0000)
TODO: might need more work for systems without a hardware clock

packages/initscripts/initscripts-1.0/bootmisc.sh
packages/initscripts/initscripts-1.0/save-rtc.sh
packages/initscripts/initscripts_1.0.bb

index 814dba676cf00348df28374e0163ea3e5a59975a..1c817fab5e664282f8704642095417ae88150e8b 100755 (executable)
@@ -62,10 +62,15 @@ fi
 /sbin/ldconfig
 
 # 
-# Recover the time, if there is a time file                 
+# Recover the time, if there is a time file (first boot only)
+# If not, set system clock from hardware clock
 #
 if test -e /etc/timestamp
 then
        date -s `cat /etc/timestamp`
+       mv -f /etc/timestamp /etc/timestamp.done
+       /etc/init.d/hwclock.sh start
+else
+       /etc/init.d/hwclock.sh stop
 fi
 : exit 0
index d06aa6d5693160073faaf0036254e0e8e276b96e..de7c2b7646c14c4f9ab97472a450afbc0200dee8 100644 (file)
@@ -1,16 +1,3 @@
 #! /bin/sh
-#
-# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
-# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
-#
-# Filename: save-rtc.sh
-# Date: 03-Jul-06
-
-
-# Update the timestamp, if there is already one
-if test -e /etc/timestamp
-then
-       echo "Will restore RCT from /etc/timestamp on next boot"
-       echo "Delete that file to disable this feature."
-        date +%2m%2d%2H%2M%Y > /etc/timestamp
-fi
+#FIXME readd timestamp handling for systems where RTC doesn't survive a reboot
+/etc/init.d/hwclock stop
index 39b1eee9c1c129b0390c7d13758c5c42d613f492..aa308338953c4c85bafcb9fbb178b53e5fb9a170 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r96"
+PR = "r97"
 
 SRC_URI = "file://halt \
            file://ramdisk \
@@ -30,7 +30,7 @@ SRC_URI = "file://halt \
            file://device_table.txt \
            file://populate-volatile.sh \
            file://volatiles \
-          file://save-rtc.sh"
+           file://save-rtc.sh"
 
 SRC_URI_append_arm          = " file://alignment.sh"