Re: NTP-сервера Debian
2009/3/21 James Brown <jbrownfirst@gmail.com>:
> Не подскажите, у Debian свои NTP- сервера? И где (в каких файлах) можно
> посмотреть, через какие NTP-сервера синхронизируется время моей системы?
$ cat /etc/default/ntpdate
# The settings in this file are used by the program ntpdate-debian, but not
# by the upstream program ntpdate.
# Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
# so you only have to keep it in one place.
NTPDATE_USE_NTP_CONF=yes
# List of NTP servers to use (Separate multiple servers with spaces.)
# Not used if NTPDATE_USE_NTP_CONF is yes.
NTPSERVERS="0.debian.pool.ntp.org 1.debian.pool.ntp.org
2.debian.pool.ntp.org 3.debian.pool.ntp.org"
# Additional options to pass to ntpdate
NTPOPTIONS=""
$ cat /usr/sbin/ntpdate-debian
#!/bin/sh
set -e
if [ -r /etc/default/ntpdate ]; then
. /etc/default/ntpdate
fi
if [ "$NTPDATE_USE_NTP_CONF" = yes ]; then
for f in /etc/ntp.conf.dhcp /etc/ntp.conf /etc/openntpd/ntpd.conf; do
if [ -r "$f" ]; then
file=$f
break
fi
done
if [ -n "$file" ]; then
NTPSERVERS=$(sed -rne 's/^(servers?|peer)
([-_.:[:alnum:]]+).*$/\2/p' "$file" | grep -v '^127\.127\.') || [ $?
-le 1 ]
fi
elif [ -r /etc/default/ntpdate.dhcp ]; then
. /etc/default/ntpdate.dhcp
fi
exec /usr/sbin/ntpdate $NTPOPTIONS "$@" $NTPSERVERS
--
Best regards, Oleg Gashev.
Reply to: