2 # Copyright (C) 2006 OpenWrt.org
4 ntp_server=$(nvram get ntp_server)
5 case "${ACTION:-ifup}" in
7 ps x | grep 'bin/[n]tpclient' >&- || {
8 route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${ntp_server:-pool.ntp.org} &
12 route -n 2>&- | grep '^0.0.0.0' >&- || killall ntpclient 2>&- >&- ;;