diff options
author | Gary Thomas <gary@mlbassoc.com> | 2012-02-10 09:16:05 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-23 23:59:35 +0000 |
commit | daeb5beb8f88e0ca6d0449909deb744136040740 (patch) | |
tree | d606ef98bc0ac768ea136f6515cae144d28fe93b | |
parent | 831e0b5cd7f12f9ff441dbad1c287e232ef480b7 (diff) | |
download | poky-daeb5beb8f88e0ca6d0449909deb744136040740.tar.gz |
initscripts: Make /etc/timestamp consistent again.
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>
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | 4 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh | 2 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh index d9e8ffa373..20ec0a025d 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | |||
@@ -68,9 +68,9 @@ fi | |||
68 | /etc/init.d/hwclock.sh start | 68 | /etc/init.d/hwclock.sh start |
69 | if test -e /etc/timestamp | 69 | if test -e /etc/timestamp |
70 | then | 70 | then |
71 | SYSTEMDATE=`date -u +%4Y%2m%2d` | 71 | SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` |
72 | read TIMESTAMP < /etc/timestamp | 72 | read TIMESTAMP < /etc/timestamp |
73 | if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt $SYSTEMDATE ]; then | 73 | if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then |
74 | date -u $TIMESTAMP | 74 | date -u $TIMESTAMP |
75 | /etc/init.d/hwclock.sh stop | 75 | /etc/init.d/hwclock.sh stop |
76 | fi | 76 | fi |
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh index 3d8e8507e7..1f804e2374 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh | |||
@@ -10,4 +10,4 @@ | |||
10 | ### END INIT INFO | 10 | ### END INIT INFO |
11 | 11 | ||
12 | # Update the timestamp | 12 | # Update the timestamp |
13 | date -u +%2m%2d%2H%2M%4Y > /etc/timestamp | 13 | date -u +%4Y%2m%2d%2H%2M > /etc/timestamp |
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index 203c60548c..b56c55c8a5 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb | |||
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip | |||
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
6 | PR = "r129" | 6 | PR = "r130" |
7 | 7 | ||
8 | INHIBIT_DEFAULT_DEPS = "1" | 8 | INHIBIT_DEFAULT_DEPS = "1" |
9 | 9 | ||