1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
7 local cfg
="$CONFIG_SECTION"
9 config_get cfgtype
"$cfg" TYPE
11 if [ "$cfgtype" = ntpclient
]
13 config_get hostname
$cfg hostname
14 config_get port
$cfg port
15 config_get count
$cfg count
17 ps |
grep -q 'bin/[n]tpclient' || \
18 /usr
/sbin
/ntpclient
-s -c ${count:-1} -l -h $hostname -p ${port:-123} 2>&- >&- &
23 config_load ntpclient
&
27 killall ntpclient
2>&- >&-