5be3b36efa7f0acf3a2e8bd2409bc797ddd2148a
2 # Copyright (C) 2006 OpenWrt.org
7 local cfg
="$CONFIG_SECTION"
9 config_get cfgtype
"$cfg" TYPE
13 config_get hostname
$cfg hostname
14 config_get port
$cfg port
16 ps x |
grep 'bin/[n]tpclient' >&- ||
{
17 route
-n 2>&- |
grep '^0.0.0.0' >&- && {
18 /usr
/sbin
/ntpclient
-s -h $hostname -p ${port:-123} 2>&- >&-
24 case "${ACTION:-ifup}" in
26 config_load ntp_client
&
29 route
-n 2>&- |
grep '^0.0.0.0' >&- || killall ntpclient
2>&- >&-