Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/etc/rc.d



In message: <87y6px9cr9.fsf%snark.cb.piermont.com@localhost>
            "Perry E. Metzger" <perry%piermont.com@localhost> writes:
: 
: "M. Warner Losh" <imp%bsdimp.com@localhost> writes:
: > In message: <87ab2dat79.fsf%snark.cb.piermont.com@localhost>
: >             "Perry E. Metzger" <perry%piermont.com@localhost> writes:
: > : 
: > : Frank Kardel <kardel%netbsd.org@localhost> writes:
: > : > Actually we can retire ntpdate in rc unless we are very tight on
: > : > memory. ntpd_flags should add the -g flag. This allows  for a  big
: > : > (time setting) initial (and only one time) step in ntpd.
: > : 
: > : I was made aware of that a few days ago.
: >
: > How long after startup does ntpd exit in this case?
: 
: It doesn't. -g says that the initial time difference may be large and to
: just step the time rather than slewing it on initial start. Then you
: don't need ntpdate. (You *can* use ntpd with other flags to behave like
: ntpdate but that's not the purpose here.)

I think you've missed my point.

With ntpdate the time is set when ntpdate is run, and the
adjtime/ntpd_adjtime parameters aren't set (which is part of what I
meant by 'not going to change', the other part is 'time will pass
normally without jumps').

With ntpd -g, it means that time will be messed up until the time is
first set (which isn't after the first measurement).  There are
several polling intervals, about a minute apart, that have to happen
before ntpd believes the time (at least historically, I haven't
checked the exact version in NetBSD).  This means that different
things in the system will start up with the wrong time.

Eg, the system starts up with Jan 1, 1980 (lovely bios error, pick any
other year you want, the example is still valid)...  ntpd starts, as
does sendmail, cron, sshd, etc.  Then, a few minutes later, time jumps
forward 29 years.

Warner


Home | Main Index | Thread Index | Old Index