From owner-svn-src-all@FreeBSD.ORG Thu Jan 29 05:28:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E5B71065673; Thu, 29 Jan 2009 05:28:41 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by mx1.freebsd.org (Postfix) with ESMTP id A71538FC1B; Thu, 29 Jan 2009 05:28:40 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by fk-out-0910.google.com with SMTP id f40so4410094fka.11 for ; Wed, 28 Jan 2009 21:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=dHcEUdWBnqBXZg+VdzvVBsszHlp4eYItyzGn3ldJE4o=; b=ME2kT7whgQe0GjhbmyjYK7EyCu4V+YQL+HYm693AIZB3vDcRXjnPjbAXooTu0v8mtW phhiGlHlmQVYMHtgNh4tTO3TqA2mm7i35rvFFBr6Ildd7qr0hQdQNNoeyJVU3inLJ10U x/28MPlnnzB5f1KBkNEK6/JHfXctCl5dTyGnQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YciGfqBHHWd90IUxNqIA/aQvZQzkO3+wHSWFSl5FhrtCp3/Mf6Oj7dGP8Mq4Ejs68f Bs30hDsE9YzYloIZijF9Y/clVf/v5atqfJti25Rj0TFD1pV+w9oYw7xIbyQPUoLBs6RB rJ/ZSR02Lf47T/XExLBngWYTEnlX4MJJx0+Nk= MIME-Version: 1.0 Received: by 10.180.218.15 with SMTP id q15mr3181433bkg.194.1233206919645; Wed, 28 Jan 2009 21:28:39 -0800 (PST) In-Reply-To: <87r62nnb7t.fsf@kobe.laptop> References: <200901272013.n0RKDOBR095434@svn.freebsd.org> <6eb82e0901272050l6678ea37idc8ea53e948a15e5@mail.gmail.com> <87r62nnb7t.fsf@kobe.laptop> Date: Thu, 29 Jan 2009 13:28:39 +0800 Message-ID: <6eb82e0901282128o1e38724bsc2dd7a44ebb7de1e@mail.gmail.com> From: Rong-en Fan To: Giorgos Keramidas Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187782 - in head: etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 05:28:42 -0000 On Wed, Jan 28, 2009 at 3:25 PM, Giorgos Keramidas wrote: > On Wed, 28 Jan 2009 12:50:22 +0800, Rong-en Fan wrote: >> On Wed, Jan 28, 2009 at 4:13 AM, Giorgos Keramidas 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