Voici un extrait de /etc/init.d/ntpd
start() {
readconf;
if [ -z "$tickers" ]; then
tickers=$timeservers
fi
if [ -s "$ntpstep" -o -n "$dostep" ]; then
# Synchronize with servers if step-tickers exists
# or the -x option is used
echo -n $"$prog: Synchronizing with time server: "
/usr/sbin/ntpdate $dropstr -s -b -p 8 $tickers 2>/dev/null >/dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
if [ $RETVAL -ne 0 ]; then
OPTIONS="$OPTIONS -g"
fi
else
# -g can replace the grep for time servers
# as it permits ntpd to violate its 1000s limit once.
OPTIONS="$OPTIONS -g"
fi
# Start daemons.
echo -n $"Starting $prog: "
daemon ntpd $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ntpd
return $RETVAL
}
On constate que la commande ntpdate est utilisée, j'ai donc regardé la page de manuel de cette commande :
SYNOPSIS
ntpdate [ -bBdoqsuv ] [ -a key ] [ -e authdelay ] [ -k keyfile ] [ -o version ] [ -p samples ] [ -t timeout ] [ -U user_name ] server [ ... ]
et plus bas
-t timeout Specify the maximum time waiting for a server response as the value timeout , in seconds and fraction. The value is
is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.
Je dirais donc ajoute ce paramètre dans le fichier de configuration du service.
🙂