Parent Directory
|
Revision Log
use our vendor zone, this is important to prevent desasters note: people deploying appliances based upon FreeWRT in very large numbers (thousands, or even more) should definitively get their own vendor zone instead
| 1 | #!/bin/sh |
| 2 | |
| 3 | . /etc/rc.conf |
| 4 | |
| 5 | case $1 in |
| 6 | autostart) |
| 7 | test x"${ntpclient:-NO}" = x"NO" && exit 0 |
| 8 | sleep 15 |
| 9 | exec $0 start |
| 10 | ;; |
| 11 | start) |
| 12 | default_flags="-c 1 -s" |
| 13 | if [ -e /etc/ntpd.conf ]; then |
| 14 | tmp=`cat /etc/ntpd.conf | grep ^server | awk '{ print $2 }' | head -n1` |
| 15 | tmp="${tmp:-1.freewrt.pool.ntp.org}" |
| 16 | fi |
| 17 | ntpclient_server="${ntpclient_server:-$tmp}" |
| 18 | ntpclient_flags="${ntpclient_flags:-$default_flags}" |
| 19 | |
| 20 | /usr/sbin/ntpclient $ntpclient_flags -h $ntpclient_server >/dev/null & |
| 21 | ;; |
| 22 | stop) |
| 23 | killall ntpclient |
| 24 | ;; |
| 25 | restart) |
| 26 | $0 stop |
| 27 | $0 start |
| 28 | ;; |
| 29 | *) |
| 30 | echo "Usage: $0 {start | stop | restart}" |
| 31 | exit 1 |
| 32 | ;; |
| 33 | esac |
| 34 | exit $? |
| root@freewrt.org:443 | ViewVC Help |
| Powered by ViewVC 1.1.20 |