Imported sources from subversion.
This commit is contained in:
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