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

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to