Help - Search - Members - Calendar
Full Version: 5600 - Fix For Time Not Saving On Reboot - 3.5.4
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > Angstrom & OpenZaurus
steven999
Hi All,

I managed to come up with a fix for the time not saving on reboot for the 5600 and OZ 3.5.4. Taking a look, the timesaving that is done in the reboot script that is symlinked to /etc/rc6.d/S90reboot comes after the scripts that unmount the filesystem. So I figured that because of the unmount, the datetime in reboot couldn't possibly write to disk.

What I did was add a script called savetime to init.d with the contents from S90reboot that are relevant to time saving:

#!/bin/sh
# Update the timestamp, if there is one
if test -e /etc/timestamp
then
date +%2m%2d%2%2M%2Y > /etc/timestamp
fi


I then ran "chmod 766 savetime" to make it executable. After that, I linked it into /etc/rc6.d with:

ln -s /etc/init.d/savetime /etc/rc6.d/S21savetime

This runs it after the killsigs but before any file unmounting scripts are executed.

If someone who has this issue could please try this out and verify, it'd be great to see if this is the best fix to do.

Also, how does one submit something like this to OZ for inclusion?

Thanks and hope that solves the problem for others!
steven

p.s. - Because time is saved in the file and not referenced from the clock, on reboot the time will have drifted by the amount of time it takes the reboot, which for me was about 2 minutes, but it's a lot easier to quickly adjust the two minute than have to enter in day/month/time. =)
Mickeyl
Ah right. Could you please add that into the OE bugtracker for future releases?
steven999
Just added:

http://bugs.openembedded.org/show_bug.cgi?id=780

BTW: Thanks for all of your hard work!


QUOTE(Mickeyl @ Mar 25 2006, 04:24 AM)
Ah right. Could you please add that into the OE bugtracker for future releases?
*
Greg2
I've added a comment to Bugzilla that your (savetime) script has also been tested and works on the collie.

Thanks

Greg
le_bul_de_sier
Here is fixed script (there is an error in fomat string in original post)

CODE
#!/bin/sh
# Update the timestamp, if there is one
if test -e /etc/timestamp
then
       date +%2m%2d%2H%2M%Y > /etc/timestamp
fi
steven999
Thanks for posting the fix; I had typed it reading from my PDA and didn't double check it well enough and actually have what you wrote on my PDA. =o

QUOTE(le_bul_de_sier @ Mar 25 2006, 07:56 AM)
Here is fixed script (there is an error in fomat string in original post)

CODE
#!/bin/sh
# Update the timestamp, if there is one
if test -e /etc/timestamp
then
       date +%2m%2d%2H%2M%Y > /etc/timestamp
fi

*
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.