Rob MacGregor <[EMAIL PROTECTED]> wrote:
 > Eli K. Breen wrote:
 > > I'm not sure that this will cut it as it will days a very long time to
 > > adjust to the proper time. Is there any way to speed this up?
 > 
 > Not within NTPd itself.  You could go with manually stepping the time in 1s
 > intervals.

Adding to that, the following /bin/sh snippet should do
(untested!).  You have to kill ntpd before.

STEP=100        # number of seconds to step forward
while [ $STEP -gt 0 ]; do
        date -f %s $(( `date +%s` + 1 ))
        sleep 1
        STEP=$(( $STEP - 1 ))
done

It will take about 100 seconds to correct the clock forward
by another 100 seconds.  If you need to correct backwards,
replace "+ 1" by "- 1".  For different numbers of seconds
to correct, replace the 100 in the first line.

When you have approached the correct time sufficiently (i.e.
within a few seconds), restart ntpd with the -x option.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Documentation is like sex; when it's good, it's very, very good,
and when it's bad, it's better than nothing."
        -- Dick Brandon
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to