Imported sources from subversion.
This commit is contained in:
41
packages/ntp/default.bash
Normal file
41
packages/ntp/default.bash
Normal file
@@ -0,0 +1,41 @@
|
||||
version=\
|
||||
(
|
||||
'4.2.6p5'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://archive.ntp.org/ntp4/ntp-4.2/ntp-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'00df80a84ec9528fcfb09498075525bc'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
"../ntp-$version/configure" \
|
||||
--prefix="/" \
|
||||
--target=$cfg_target_canonical \
|
||||
--host=$cfg_target_canonical \
|
||||
--build=$cfg_host_canonical \
|
||||
--disable-all-clocks \
|
||||
--disable-parse-clocks \
|
||||
--enable-NMEA \
|
||||
--enable-LOCAL-CLOCK \
|
||||
--without-net-snmp-config
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_target_strip ntpd/ntpd -o $cfg_dir_rootfs/usr/bin/ntpd &&
|
||||
$cmd_target_strip ntpdate/ntpdate -o $cfg_dir_rootfs/usr/bin/ntpdate &&
|
||||
$cmd_target_strip ntpq/ntpq -o $cfg_dir_rootfs/usr/bin/ntpq &&
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
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