Imported sources from subversion.
This commit is contained in:
9
packages/ntp/fs/etc/ntp/client.cfg
Normal file
9
packages/ntp/fs/etc/ntp/client.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
server 192.168.106.210
|
||||
server 192.168.106.211
|
||||
server 192.168.106.212
|
||||
server 192.168.106.213
|
||||
server 192.168.106.84
|
||||
|
||||
restrict default nomodify nopeer
|
||||
restrict 127.0.0.1
|
||||
driftfile /var/tmp/ntpd.drift
|
8
packages/ntp/fs/etc/ntp/default.cfg
Normal file
8
packages/ntp/fs/etc/ntp/default.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
server 127.127.1.1
|
||||
fudge 127.127.1.1 stratum 1
|
||||
|
||||
restrict default noserve
|
||||
restrict 127.0.0.1
|
||||
restrict 192.168.106.0 mask 255.255.255.0
|
||||
|
||||
driftfile /var/tmp/ntpd.drift
|
2
packages/ntp/fs/etc/ntp/gpspps.cfg
Normal file
2
packages/ntp/fs/etc/ntp/gpspps.cfg
Normal file
@@ -0,0 +1,2 @@
|
||||
server 127.127.20.0 mode 65 prefer
|
||||
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1
|
14
packages/ntp/fs/etc/ntp/server.cfg
Normal file
14
packages/ntp/fs/etc/ntp/server.cfg
Normal file
@@ -0,0 +1,14 @@
|
||||
server 0.pool.ntp.org iburst
|
||||
server 1.pool.ntp.org iburst
|
||||
server 2.pool.ntp.org iburst
|
||||
server 3.pool.ntp.org iburst
|
||||
|
||||
server 127.127.1.0
|
||||
fudge 127.127.1.0 stratum 10
|
||||
|
||||
driftfile /var/tmp/ntp.drift
|
||||
logfile /var/log/ntp.log
|
||||
|
||||
restrict default nomodify nopeer
|
||||
restrict 127.0.0.1
|
||||
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
|
23
packages/ntp/fs/etc/rc.d/gpspps
Normal file
23
packages/ntp/fs/etc/rc.d/gpspps
Normal file
@@ -0,0 +1,23 @@
|
||||
start()
|
||||
{
|
||||
if ! [ -f /dev/gps0 ]; then
|
||||
mount -o remount,rw /
|
||||
ln -fs "$cfg_gpspps_dev" /dev/gps0
|
||||
mount -o remount,ro /
|
||||
fi
|
||||
|
||||
if ! [ -f /dev/gpspps0 ]; then
|
||||
mount -o remount,rw /
|
||||
ln -fs /dev/pps0 /dev/gpspps0
|
||||
mount -o remount,ro /
|
||||
fi
|
||||
|
||||
/usr/bin/ldattach PPS /dev/gps0
|
||||
/usr/bin/ntpd -g -c /etc/ntp/gpspps.cfg
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
killall ntpd
|
||||
killall ldattach
|
||||
}
|
16
packages/ntp/fs/etc/rc.d/ntpd
Normal file
16
packages/ntp/fs/etc/rc.d/ntpd
Normal file
@@ -0,0 +1,16 @@
|
||||
# Configuration parameters
|
||||
# cfg_ntpd_config: NTP Daemon configuration file.
|
||||
|
||||
start()
|
||||
{
|
||||
if [ -z "$cfg_ntpd_config" ]; then
|
||||
cfg_ntpd_config="/etc/ntp/default.cfg"
|
||||
fi
|
||||
|
||||
/usr/bin/ntpd -g -c "$cfg_ntpd_config"
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
killall ntpd
|
||||
}
|
15
packages/ntp/fs/etc/rc.d/ntpdate
Normal file
15
packages/ntp/fs/etc/rc.d/ntpdate
Normal file
@@ -0,0 +1,15 @@
|
||||
start()
|
||||
{
|
||||
n=0
|
||||
while [ $n -lt 30 ]; do
|
||||
/usr/bin/ntpdate "$cfg_ntp_server"
|
||||
if [ $? -eq 0 ]; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
true
|
||||
}
|
Reference in New Issue
Block a user