On Wed, Jan 28, 2009 at 3:25 PM, Giorgos Keramidas <keram...@freebsd.org> wrote: > On Wed, 28 Jan 2009 12:50:22 +0800, Rong-en Fan <gra...@gmail.com> wrote: >> On Wed, Jan 28, 2009 at 4:13 AM, Giorgos Keramidas <keram...@freebsd.org> >> wrote: >>> Modified: head/etc/rc.d/ntpd >>> ============================================================================== >>> --- head/etc/rc.d/ntpd Tue Jan 27 19:56:38 2009 (r187781) >>> +++ head/etc/rc.d/ntpd Tue Jan 27 20:13:24 2009 (r187782) >>> @@ -23,7 +23,7 @@ ntpd_precmd() >>> rc_flags="-c ${ntpd_config} ${ntpd_flags}" >>> >>> if checkyesno ntpd_sync_on_start; then >>> - rc_flags="-g $rc_flags" >>> + rc_flags="-q -g $rc_flags" >>> fi >>> >>> if [ -z "$ntpd_chrootdir" ]; then >>> >> >> According to ntp(8), -q makes ntpd exits just after the first time the >> clock is set. > > Yes, you are right :) > >> Doesn't this mean if ntpd_sync_on_start is on and the time difference >> is large, then ntpd will exit after the first time sync? Is this the >> behavior we really want? >> >> Shouldn't we keep ntp running after the clock is adjusted? > > This is correct too. The effect of `ntpd_sync_on_start' is supposed to > be the same as if we run `ntpdate' before the real ntpd starts, so this > option only applies to the first sync-once instance of ntpd. The real > ntpd starts later, and finds the clock pre-synced.
Hmm... I think I'm confused. According to rc.d/ntpd, if ntpd_sync_on_start is set to yes, it adds '-q -g' to rc_flags. By doing so, ntpd start makes ntpd exists immediately after the first sync. Then, who is responsible to start the "real ntpd" you said above? Thanks, Rong-En Fan _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"