[packages] ntpd
[openwrt/svn-archive/archive.git] / net / ntpd / files / ntpdate.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2008 OpenWrt.org
3
4 START=60
5
6 STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org"
7 TIMEOUT="2" # in seconds
8
9 start() {
10 for s in $STEP_SERVERS ; do
11 /usr/sbin/ntpdate -s -b -u -t "$TIMEOUT" "$s" && break
12 done
13 }