logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.
marc
marc
Offline
0
Hello, I noticed something weird was going on with the igeps I had running, when they rebooted they got the time and date from the past, ignorig the hardware clock's correct time. I searched a bit and I found that: /etc/init.d/bootmisc.sh has a small routine that checks current date with the file /etc/timestamp2 but there is an error and the routine always corrects current time with the one stored in the file /etc/timestamp2 I think the error is in the expression: NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)` the problem is that $SYSTEMDATE + 10000 gives a negative number probably because $SYSTEMDATE is a string and not an Integer. Could someone double check this? I don't know if it has something to do but my clock is set to SPAIN CEST instead of the default localtime settings.
Responses (1)
  • Accepted Answer

    Tuesday, June 12 2012, 09:34 AM - #permalink
    0
    Could you print the variables used by the bootmisc.sh script ? Seems is working with poky firmware 3.3.1-11 [code] root@igep00x0:/etc/init.d# SYSTEMDATE=`date "+%Y%m%d%2H%2M"` root@igep00x0:/etc/init.d# read TIMESTAMP < /etc/timestamp2 root@igep00x0:/etc/init.d# echo $SYSTEMDATE 200001010001 root@igep00x0:/etc/init.d# echo $TIMESTAMP 200001010005 root@igep00x0:/etc/init.d# NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000\)` root@igep00x0:/etc/init.d# echo $NEEDUPDATE 0 [/code] If i set TIMESTAMP to current date the NEEDUPDATE variable returns 1 [code] root@igep00x0:/etc/init.d# TIMESTAMP=201206120005 root@igep00x0:/etc/init.d# NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE + 10000 \)` root@igep00x0:/etc/init.d# echo $NEEDUPDATE 1 [/code]
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat