initscripts: Make /etc/timestamp consistent again.
PATCH 1/1 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.
--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +2 -2
@@ -68,9 +68,9 @@ fi /etc/init.d/hwclock.sh start if test -e /etc/timestamp then - SYSTEMDATE=`date -u +%4Y%2m%2d` + SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` read TIMESTAMP < /etc/timestamp - if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt $SYSTEMDATE ]; then + if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then date -u $TIMESTAMP /etc/init.d/hwclock.sh stop fi
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +1 -1
@@ -10,4 +10,4 @@ ### END INIT INFO # Update the timestamp -date -u +%2m%2d%2H%2M%4Y > /etc/timestamp +date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -PR = "r129" +PR = "r130" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
1.7.7.6
Quoted 10 lines · Gary Thomas
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/timestampis newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day.
Quoted 6 lines
Signed-off-by Gary Thomas<[email protected]>--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Hi Gary,
You should do the same changes to meta/classes/image.bbclass where the /etc/timestamp file is generated to filesystem image.
Regards,
Lauri Hintsala
Quoted 19 lines · Lauri Hintsala
Quoted 10 lines · Gary Thomas
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/timestampis newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day.Quoted 6 lines
Signed-off-by Gary Thomas<[email protected]>--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Quoted 4 lines
Hi Gary,
You should do the same changes to meta/classes/image.bbclass where the
/etc/timestampfile is generated to filesystem image.
Agreed, this is a nasty inconsistency. I've pushed a patch into master which fixes this.
Cheers,
Richard
Saul Wold
AppliedQuoted 48 lines · Gary Thomas
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/timestampis newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day.Signed-off-by Gary Thomas<[email protected]>--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +2
-2@@ -68,9 +68,9 @@ fi /etc/init.d/hwclock.sh start if test -e /etc/timestamp then - SYSTEMDATE=`date -u +%4Y%2m%2d` + SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` read TIMESTAMP< /etc/timestamp - if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt $SYSTEMDATE ]; then + if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then date -u $TIMESTAMP /etc/init.d/hwclock.sh stop fimeta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +1
-1@@ -10,4 +10,4 @@ ### END INIT INFO # Update the timestamp -date -u +%2m%2d%2H%2M%4Y> /etc/timestamp +date -u +%4Y%2m%2d%2H%2M> /etc/timestampmeta/recipes-core/initscripts/initscripts_1.0.bb +0
-0
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip · line 9
Quoted 8 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +1
-1@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -PR = "r129" +PR = "r130" INHIBIT_DEFAULT_DEPS = "1"
Merged into OE-core
Thanks
Sau!
Hi,
I think we need to add BUSYBOX_CONFIG_FEATURE_TEST_64 to the busybox defconfig after this patch.
On my build (which had neither BUSYBOX_CONFIG_FEATURE_TEST_64 nor BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64) I was getting 'out of range' errors.
Regards
James Limbouris
Quoted 82 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Saul Wold
Sent: Saturday, 25 February 2012 2:31 AM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH] initscripts: Make/etc/timestampconsistent again.Quoted 10 lines · Gary Thomas
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/timestampis newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day.Review
Quoted 8 lines
Signed-off-by Gary Thomas<[email protected]>--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.shmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh fi · line 73
Quoted 11 lines
index d9e8ffa..20ec0a0 100755
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +1
-2@@ -68,9 +68,9 @@ fi /etc/init.d/hwclock.sh start if test -e /etc/timestamp then - SYSTEMDATE=`date -u +%4Y%2m%2d` + SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` read TIMESTAMP< /etc/timestamp - if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt$SYSTEMDATE ]; then
Review
Quoted 5 lines
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +1
-0+ if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then date -u $TIMESTAMP /etc/init.d/hwclock.sh stop fi(quoted diff) +0
-0
b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.shmeta/recipes-
Quoted 10 lines
index 3d8e850..1f804e2 100644
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +1
-1@@ -10,4 +10,4 @@ ### END INIT INFO # Update the timestamp -date -u +%2m%2d%2H%2M%4Y> /etc/timestamp +date -u +%4Y%2m%2d%2H%2M> /etc/timestampmeta/recipes- renamed from meta/recipes-core/initscripts/initscripts_1.0.bb +0
-0core/initscripts/initscripts_1.0.bb
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system
Quoted 4 lines
index 203c605..b56c55c 100644
meta/recipes-core/initscripts/initscripts_1.0.bb +0
-0@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic systemstartup initialization scrip
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
Quoted 3 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0
-0SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM ="file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip · line 9
Quoted 5 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +1
-1-PR = "r129" +PR = "r130" INHIBIT_DEFAULT_DEPS = "1"Merged into OE-core
Thanks
Sau!_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Also, CONFIG_FEATURE_DATE_COMPAT=y has to be removed - it mungs the YYYYMMddhhmm string into hhmmYYYYMMdd !
Quoted 102 lines
-----Original Message-----
From: James Limbouris
Sent: Wednesday, 29 February 2012 1:32 PM
To: Patches and discussions about the oe-core layer
Subject: RE: [OE-core] [PATCH] initscripts: Make/etc/timestampconsistent again.Hi,
I think we need to add
BUSYBOX_CONFIG_FEATURE_TEST_64to the busybox defconfig after this patch.
On my build (which had neitherBUSYBOX_CONFIG_FEATURE_TEST_64norBUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64) I was getting 'out of range' errors.Regards
James LimbourisQuoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] OnBehalf
Quoted 50 lines
Of Saul Wold
Sent: Saturday, 25 February 2012 2:31 AM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH] initscripts: Make/etc/timestampconsistent again.Quoted 10 lines · Gary Thomas
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/timestampis newer [at all] than the current system time, set the system clock from the stored value, down to the minute, not just the day.Review
Quoted 8 lines
Signed-off-by Gary Thomas<[email protected]>--- .../initscripts/initscripts-1.0/bootmisc.sh | 4 ++-- .../initscripts/initscripts-1.0/save-rtc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.shmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh fi · line 73
Quoted 11 lines
index d9e8ffa..20ec0a0 100755
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +1
-2@@ -68,9 +68,9 @@ fi /etc/init.d/hwclock.sh start if test -e /etc/timestamp then - SYSTEMDATE=`date -u +%4Y%2m%2d` + SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` read TIMESTAMP< /etc/timestamp - if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt$SYSTEMDATE ]; then
Review
Quoted 5 lines
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +1
-0+ if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then date -u $TIMESTAMP /etc/init.d/hwclock.sh stop fi(quoted diff) +0
-0
b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.shQuoted 6 lines
index 3d8e850..1f804e2 100644
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +0
-0@@ -10,4 +10,4 @@ ### END INIT INFOQuoted 4 lines
Review
Quoted 4 lines
meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh +1
-1# Update the timestamp -date -u +%2m%2d%2H%2M%4Y> /etc/timestamp +date -u +%4Y%2m%2d%2H%2M> /etc/timestamp(quoted diff) +0
-0b/meta/recipes-
Quoted 25 lines
core/initscripts/initscripts_1.0.bb
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system
Quoted 4 lines
index 203c605..b56c55c 100644
meta/recipes-core/initscripts/initscripts_1.0.bb +0
-0@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic systemstartup initialization scrip
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
Quoted 3 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0
-0SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM ="file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip · line 9
Quoted 5 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +1
-1-PR = "r129" +PR = "r130" INHIBIT_DEFAULT_DEPS = "1"Merged into OE-core
Thanks
Sau!_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core