[oe-commits] org.oe.dev initscripts: first steps towards working together with RTC

mickeyl commit openembedded-commits at lists.openembedded.org
Wed Aug 15 12:58:36 UTC 2007


initscripts: first steps towards working together with RTC
TODO: might need more work for systems without a hardware clock

Author: mickeyl at openembedded.org
Branch: org.openembedded.dev
Revision: 168826fe7a474582a17aec752d64980525e9eb61
ViewMTN: http://monotone.openembedded.org/revision.psp?id=168826fe7a474582a17aec752d64980525e9eb61
Files:
1
packages/initscripts/initscripts-1.0/bootmisc.sh
packages/initscripts/initscripts-1.0/save-rtc.sh
packages/initscripts/initscripts_1.0.bb
Diffs:

#
# mt diff -r9ca2d91b7a004d5f974f6ebf1c951af37a1cd6d2 -r168826fe7a474582a17aec752d64980525e9eb61
#
# 
# 
# patch "packages/initscripts/initscripts-1.0/bootmisc.sh"
#  from [04ee5c8267f42bb17d0b7465f613854b9f79b352]
#    to [8705a7fa228b469423d8ff76a3f1cea90b807ab9]
# 
# patch "packages/initscripts/initscripts-1.0/save-rtc.sh"
#  from [353d869c5dce5dc015a458b99ee7526623ac136b]
#    to [9b1d470537af18827367537206420cc5f66f877e]
# 
# patch "packages/initscripts/initscripts_1.0.bb"
#  from [987f1ca2c2c0d5cd92451cb463f65beb68b9a89d]
#    to [6c15812e6872f15d45072ac63fb02065a0639077]
# 
============================================================
--- packages/initscripts/initscripts-1.0/bootmisc.sh	04ee5c8267f42bb17d0b7465f613854b9f79b352
+++ packages/initscripts/initscripts-1.0/bootmisc.sh	8705a7fa228b469423d8ff76a3f1cea90b807ab9
@@ -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
============================================================
--- packages/initscripts/initscripts-1.0/save-rtc.sh	353d869c5dce5dc015a458b99ee7526623ac136b
+++ packages/initscripts/initscripts-1.0/save-rtc.sh	9b1d470537af18827367537206420cc5f66f877e
@@ -1,16 +1,3 @@
 #! /bin/sh
+#FIXME readd timestamp handling for systems where RTC doesn't survive a reboot
+/etc/init.d/hwclock stop
-#
-# Copyright Matthias Hentges <devel at 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
============================================================
--- packages/initscripts/initscripts_1.0.bb	987f1ca2c2c0d5cd92451cb463f65beb68b9a89d
+++ packages/initscripts/initscripts_1.0.bb	6c15812e6872f15d45072ac63fb02065a0639077
@@ -1,10 +1,10 @@ LICENSE = "GPL"
 DESCRIPTION = "SysV init scripts"
 SECTION = "base"
 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"
 






More information about the Openembedded-commits mailing list