i want to use ntpdate to set the clock of my gumstix, which is connected via Ethernet to the Internet.
I tried to create a S60time in /etc/init.d, but it looks like ntpdate is called, but it can't get the time. Could it be that at this time the Ethernet is not yet running and / or i have no IP address at that time ?
Ok, other solution: I tried to put a shell script calling ntpdate into /etc/network/if-up.d/
Name is again S60time. But there my script is not called at all when i reboot.
1) Is someone already done this ? Where is the right place to put it not too early (before everything is up) and not too late (.bashrc, done only when i login).
2) I also tried to set the timezone: export TZ=CET-1, before running ntpdate, but i can't see this variable afterwards. How/Where can i globally set variables ? I googled and found various articles on zoneinfo (with various subdirs for cities). Is it the better way to set the TZ on the gumstix ?
Doing all the above steps manually (export TZ=CET-1 ; ntpdate my-ntp-server) is working fine.