Automatic NTP updating of my Pandora's clock ?


Mqark

Member
Joined
Oct 3, 2008
Messages
151
Website
www.konixmultisystem.com
Hi Guys,

Is it easy to set-up automatic NTP updating of my Pandora's clock? And if so, would you be so kind as to share how.

Thanks very much,
Regards,
Mark.
 
First, get ntpdate:
Code:
sudo opkg update
sudo opkg install ntpdate
Second, you need to create a script that will update your clock. Create a new file as "/etc/network/if-up.d/setdate" (or similar, it doesn't specifically have to be "setdate", I just chose that because it's obvious and memorable) which contains:
Code:
#!/bin/sh
ntpdate -u -s ca.pool.ntp.org
/sbin/hwclock --systohc
exit 0
Replace ca.pool.ntp.org with your own local ntp server. You can look them up at www.ntp.org
Finally, we tell it to run this "setdate" every time the network is connected. Edit the file as "sudo vi /etc/network/interfaces" and in the "iface wlan0 inet dhcp" section, add the line (right below the wpa-conf line):
Code:
post-up /etc/network/if-up.d/setdate

There is still a little flakiness with the timezones if you do it this way. If this seems to update your time incorrectly, come back and I'll help you fix the timezone bug. ED should be addressing the issue early in the new year, hopefully.
 
WizardStan said:
There is still a little flakiness with the timezones if you do it this way. If this seems to update your time incorrectly, come back and I'll help you fix the timezone bug. ED should be addressing the issue early in the new year, hopefully.

Already fixed for months.. if you use the latest produced image (which is somewhere between HF4 and upcoming HF5 ;))
 
Last edited:
EvilDragon said:
Already fixed for months.. if you use the latest produced image (which is somewhere between HF4 and upcoming HF5 ;) )
Well hurry it up with that hotfix, I had to reset the clock a few weeks ago and forgot how to fix the timezone manually :p
I'm just funning, you do good work, thanks :)
 
Last edited by a moderator:
Back
Top