Fix /etc/timestamp handling
v2 cover Fix /etc/timestamp handling
Recent changes have attempted to make consistant use of /etc/timestamp
In particular
5aab665 initscripts: Make /etc/timestamp consistent again.
173a48f image.bbclass: Ensure timestamp matches format used in initscripts after recent changes e32e236 busybox: Enable 64 bit shell tests, and disable non-standard date format interpretation.
However, this format of the timestamp is not directly compatible with the 'date' command line, so it must be reformatted for use. Also, the busybox CONFIG_FEATURE_DATE_COMPAT needs to be enabled so that all versions of 'date', whether from busybox or coreutils, agree on the format when setting the date from the command line.
Gary Thomas (2):
initscripts: Properly format date when set from timestamp
busybox: Restore 'date' compatability
meta/recipes-core/busybox/busybox-1.19.3/defconfig | 2 +- meta/recipes-core/busybox/busybox_1.19.3.bb | 2 +- .../initscripts/initscripts-1.0/bootmisc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.7.6
PATCH v2 1/2 initscripts: Properly format date when set from timestamp
Reformat date, as stored in /etc/timestamp, to match CLI format.
--- .../initscripts/initscripts-1.0/bootmisc.sh | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh +1 -1
@@ -71,7 +71,7 @@ then SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M` read TIMESTAMP < /etc/timestamp if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then - date -u $TIMESTAMP + date -u ${TIMESTAMP#????}${TIMESTAMP%????????} /etc/init.d/hwclock.sh stop fi fi
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 = "r131" +PR = "r132" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
1.7.7.6
PATCH v2 2/2 busybox: Restore 'date' compatability
In reply to Gary ThomasRestore CONFIG_FEATURE_DATE_COMPAT so that all versions of 'date', whether from busybox or coreutils, agree on the format when setting the date from the command line.
--- meta/recipes-core/busybox/busybox-1.19.3/defconfig | 2 +- meta/recipes-core/busybox/busybox_1.19.3.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/busybox/busybox-1.19.3/defconfig +1 -1
@@ -172,7 +172,7 @@ CONFIG_CAT=y CONFIG_DATE=y # CONFIG_FEATURE_DATE_ISOFMT is not set # CONFIG_FEATURE_DATE_NANO is not set -# CONFIG_FEATURE_DATE_COMPAT is not set +CONFIG_FEATURE_DATE_COMPAT=y CONFIG_ID=y CONFIG_GROUPS=y CONFIG_TEST=y
meta/recipes-core/busybox/busybox_1.19.3.bb +1 -1
@@ -1,5 +1,5 @@ require busybox.inc -PR = "r4" +PR = "r5" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://udhcpscript.patch \
Signature · 1 line
1.7.7.6
Richard Purdie
AppliedQuoted 12 lines · Gary Thomas
Recent changes have attempted to make consistant use of
/etc/timestamp
In particular
5aab665 initscripts: Make/etc/timestampconsistent again.
173a48f image.bbclass: Ensure timestamp matches format used in initscripts after recent changes e32e236 busybox: Enable 64 bit shell tests, and disable non-standard date format interpretation.However, this format of the timestamp is not directly compatible with the 'date' command line, so it must be reformatted for use. Also, the busybox
CONFIG_FEATURE_DATE_COMPATneeds to be enabled so that all versions of 'date', whether from busybox or coreutils, agree on the format when setting the date from the command line.
Quoted 3 lines
Gary Thomas (2):
initscripts: Properly format date when set from timestamp
busybox: Restore 'date' compatability
Merged to master, thanks.
Richard