# cat /etc/banner;cat /proc/cpuinfo |egrep -i "hardw|proc" _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M KAMIKAZE (7.09) ----------------------------------- * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! --------------------------------------------------- Processor : XScale-IXP42x Family rev 2 (v5b) Hardware : Linksys NSLU2
Set the Timezone, upon fighting uci and /etc/config/system for a while I ended up reading the init scripts and changed /etc/TZ
# date Tue Apr 23 15:54:54 UTC 2013 # echo 'EET-2EEST,M3.5.0/3,M10.5.0/4' > /etc/TZ # date Tue Apr 23 19:00:32 EEST 2013That's for Athens, Greece
Install ntpclient
# cd /usr/sbin/ # wget http://downloads.openwrt.org/kamikaze/7.09/packages/armeb/ntpclient_2003_194-4_armeb.ipk # ipkg install ntpclient_2003_194-4_armeb.ipk # rm ntpclient_2003_194-4_armeb.ipk
Set the clock
# /usr/sbin/ntpclient -c 1 -h 10.21.241.4 41385 57983.683 9344.0 149.7 67.8 308441.2 0 # date Tue Apr 23 19:06:26 EEST 201310.21.241.4 is a local timeserver
Configure ntpclient
# cd /etc/config # vi ntpclientThis is my /etc/config/ntpclient
# cat ntpclient config ntpclient option hostname '10.21.241.4' option port '123' config ntpclient option hostname '194.177.210.54' option port '123'
Make it stick
# uci commit ntpclientcheck if it did stick
# /etc/init.d/network restart # cat /etc/config/ntpclient config ntpclient option hostname '10.21.241.4' option port '123' config ntpclient option hostname '194.177.210.54' option port '123'hmm, I am not sure if that will do anything ... plan B
Enable cron
# /etc/init.d/cron enable # ps |grep crond 2086 root 308 S crond -c /etc/crontabs 21136 root 300 S grep crond
# vi /etc/init.d/ntpclient # cat /etc/init.d/ntpclient #!/bin/sh /usr/sbin/ntpclient -l -h 10.21.241.4 -c 1
Create the update clock cronjob
# vi /etc/crontabs/ntpclient # cat /etc/crontabs/ntpclient # cat /etc/crontabs/ntpclient */30 * * * * /etc/init.d/ntpclient
Restart cron-Install cronjob
# killall crond # /etc/init.d/cron start
References:
_ ntpclient _ openwrt
_ openwrt _ timezones
ntpclient OpenWrt Kamikaze