[OE-core] [PATCH v2] initscripts: fix timestamp check at bootmisc.sh
Lauri Hintsala
lauri.hintsala at bluegiga.com
Tue Dec 13 13:40:39 UTC 2011
On 12/13/2011 03:24 PM, Phil Blundell wrote:
> Is the "${var:X:Y}" substring notation part of POSIX? I have a feeling
> that it might be a GNU extension, and it didn't seem to work in dash
> when I tried it just now.
I tested it in ash of busybox. I see it doesn't work in dash. So your
suggestion is the best I know.
Hopefully final version :)
SYSTEMDATE=`date -u +%4Y%2m%2d`
read TIMESTAMP < /etc/timestamp
if [ ${TIMESTAMP#????????}${TIMESTAMP%????????} -gt $SYSTEMDATE ]; then
date -u $TIMESTAMP
/etc/init.d/hwclock.sh stop
fi
Lauri
More information about the Openembedded-core
mailing list