terrypearl wrote:
> Okay following Hal's suggestion I looked in /etc/rc.d/init.d.ntpd
>
> rather than copy over the file in it's entirety, there is a "start"
> function and a 'readconf' function called on startup. Those functions are:
>
> readconf() {
> dostep=''
> dropstr=''
> OPTIND=1
> while getopts ":aAbc:dD:f:gi:k:l:LmnN:p:P:qr:s:t:u:v:V:x" args
> $OPTIONS;
> do
> case "$args" in
> x) dostep=yes;;
> c) ntpconf="$OPTARG";;
> u) dropstr="-U $(echo $OPTARG | sed 's/:.*//')";;
> esac
> done
>
> [ -x /usr/sbin/ntpd -a -f $ntpconf ] || exit 0
>
> tickers=''
> if [ -s "$ntpstep" ]; then
> tickers=$(sed 's/#.*//' $ntpstep)
> echo "$tickers" | grep -qi '[a-z0-9]' && dostep=yes || tickers=''
> fi
> if [ -n "$dostep" -a -z "$tickers" ]; then
> # -x option is used, but step-tickers doesn't exist or contain
> # anything useful, use servers from ntp.conf instead
> tickers=$(awk '$1=="peer"||$1=="server"{print $2}' $ntpconf | \
> fgrep -v 127.127.1.0)
> fi
> }
>
> start() {
> readconf;
>
> if [ -n "$dostep" ]; then
> echo -n $"$prog: Synchronizing with time server: "
> /usr/sbin/ntpdate $dropstr -s -b $tickers 2>/dev/null >/dev/null
> RETVAL=$?
> [ $RETVAL -eq 0 ] && success || failure
> echo
> if [ $RETVAL -eq 0 ]; then
> [ "$SYNC_HWCLOCK" = "yes" ] && sync_hwclock
> else
> 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
> }
>
>
> In watching the boot messages under FC5 the bootup process delays on the
> message:
>
> ntpd: Synchronizing with time server:
>
> the bootup then hangs with this message for minutes and finally displays
> the "OK" message and proceeds with the remainder of the bootup. In the
> start function that message is displayed by the "echo" command after the
> readconf function is called and just prior to invoking the 'ntpdate' app.
>
> Now my first impulse is to simply comment out the echo line and the
> ntpdate line.
>
> But I thought that since I am far from an expert in ntpd or ntpdate or
> command scripts, I had better ask first if that would screw things up
> really bad?
>
> Or should I comment and substitute another command sequence?
>
> Thoughts??
>
>
You are here:
echo -n $"$prog: Synchronizing with time server: "
/usr/sbin/ntpdate $dropstr -s -b $tickers 2>/dev/null >/dev/null
i.e. the clock is hard set on start up.
echo the ntpdate line to stderr to see what args are used.
echo "/usr/sbin/ntpdate $dropstr -s -b $tickers " >&2
If the server connections run into silent dropping of packets this
takes for ages to time out.
Incidentally i have a similar problem with invoking "ntpq -c peers"
on a host that has a funky DNS. takes for ages.
uwe
_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.isc.org/mailman/listinfo/questions