Imported sources from subversion.

This commit is contained in:
Ricardo Martins
2013-07-13 17:19:22 +01:00
commit 12d63d1569
455 changed files with 69857 additions and 0 deletions

41
packages/ntp/default.bash Normal file
View 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 -
}

View 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

View 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

View File

@@ -0,0 +1,2 @@
server 127.127.20.0 mode 65 prefer
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1

View 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

View 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
}

View 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
}

View 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
}