git-svn-id: svn://svn.openwrt.org/openwrt/packages@5908 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian
2006-12-27 19:21:05 +00:00
parent 4b2601d406
commit f6791a95a1
5 changed files with 219 additions and 0 deletions

23
net/ntpd/files/ntp.conf Normal file
View File

@ -0,0 +1,23 @@
# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
restrict default nomodify notrap noquery
restrict 127.0.0.1
restrict 192.168.1.253
driftfile /etc/ntp.drift
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# GPS(NMEA)+PPS
#server 127.127.20.0 minpoll 4 prefer
#fudge 127.127.20.0 flag3 1 flag2 0
# SMA PPS
#server 127.127.28.0 minpoll 4 prefer
#fudge 127.127.28.0 refid PPS flag3 1
#server 192.168.1.253

View File

@ -0,0 +1,10 @@
NAME=ntpd
CONFIG=/etc/ntp.conf
COMMAND=/usr/sbin/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ -x $COMMAND ] && [ -r $CONFIG ] && {
killall ntpd
/etc/init.d/ntpd start
} &
}

13
net/ntpd/files/ntpd.init Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=60
start() {
# ln -sf /dev/ttyS0 /dev/gps0
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
/usr/sbin/ntpd -g
}
stop() {
killall ntpd
}