summaryrefslogtreecommitdiff
path: root/package/ppp/files/etc/ppp/ip-up.d/02-ntp
blob: ac25dd56776f972ce2a2f232363e653f79062dfe (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

. /etc/rc.conf

# get time via ntpclient if available
[ -x /usr/sbin/ntpclient ] && ntpclient -s -h pool.ntp.org
# get time via rdate if available
[ -x /usr/sbin/rdate ] && rdate -nv pool.ntp.org
# restart ntpd when enabled
test x"${ntpd:-NO}" = x"NO" || /etc/init.d/ntpd restart