From owner-freebsd-questions@freebsd.org Fri Jun 7 14:59:46 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E2A915AF221 for ; Fri, 7 Jun 2019 14:59:46 +0000 (UTC) (envelope-from per@hedeland.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D3E759E2 for ; Fri, 7 Jun 2019 14:59:44 +0000 (UTC) (envelope-from per@hedeland.org) ARC-Seal: i=1; a=rsa-sha256; t=1559918614; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=B2zCG8qd/Fq/oYM/Rxj/oMBlojZyGonN7PkT6kx26NY12/JeLJovJAWo6kBEfrg1oYZtyHN67br8v sUzebzbRqgwj650eK2t6Aj71xPDXleCxiOc+d3QTaPSXYaK0sQCNMWTBfWS7IXUVEKhV0bmEVyUxk3 Jq9QrQ6fT5P9If2OTsvIuQYOf9PouJG6UVlZ/lD5wGdilbZRte04mVHVs6rL/uV/hbvrgXvM92ui3i u9qaP0+/MRJ7xII1tmciAZN6QCyjSWmsyfHLtrtuyLe66HX72NC8Fbu013SyAR2fe+3i1J+v8fGXcq wCs9mMk3tXSWU6qUNCHewGGM5XuRZDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:to:subject:dkim-signature:from; bh=pi/Bw4JvWUg7gk+BYL1u0u5gMfNK+3HXLUolq5QZYfU=; b=v0SYx3mANO8LCoFVtBkkfkw5jbtEiz5DX7yMGO7BiyLi+/wGngvp1jwGFcLEg1VLRlzj00RpI7fXp e8K2ki1ODGBypCOnskH2R7mu7pBDnVC5SsM3kNkqrP3bSGxdhra+/CYWujkRLzzXK0ZuZrW+M1uVSm tt8UhUtDSdCEGhTYAU20wKOe4oVLZueKd5mp9tllIV98ckQwTntj0ab0pV07wQb1NXa5WIXm9MkEU0 XcjWbIOvpOMGWEdWgNf5mNftAcge31crYgDixHl7EHQIkGD/IgLCT86O+NiKpdO0PFhXsgGP+QpSKQ Yhpf4rRa1U9TAZ0fSA+2FrExnFM3InQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=none smtp.mailfrom=hedeland.org smtp.remote-ip=81.228.155.78; dmarc=none header.from=hedeland.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:to:subject:from; bh=pi/Bw4JvWUg7gk+BYL1u0u5gMfNK+3HXLUolq5QZYfU=; b=GiMr4yNUZrf3TcJwvXXtdYZvMuZPP79AHyIYt2imigDHctqchrrdezYvpfCrV0+9T4TTaMQMbwLuq DAyOH4fehxjmV9S/ZV7AokrixdGSHdxU5wVn9NDZq3ADEhzYmFVZQoMo0aj2o3BOakGtgwJ+aY6Eju O3XjScmeybVAwgg4EiQ8/CeDXwp8N/z3uKobmyA1r60oDuDx6Qt4wBN16dRMUL8bSeXvBZ/gQ4sQa+ jCr70sVMKpoN1LKX75XmTfwr+nDURAV8ckHXjsMv8i7Wxf7+sHtlQnPKMUtnvk8gm1Ql26GnQT3kxJ nx0ZE025nkMNCIygKDchXiELRkZKkZQ== X-MHO-RoutePath: cGVyaGVkZWxhbmQ= X-MHO-User: 9dcf4312-8932-11e9-b39a-9d2c53d3dedb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 81.228.155.78 X-Mail-Handler: DuoCircle Outbound SMTP Received: from hedeland.org (unknown [81.228.155.78]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 9dcf4312-8932-11e9-b39a-9d2c53d3dedb; Fri, 07 Jun 2019 14:43:32 +0000 (UTC) Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id x57EhTXg045067 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 7 Jun 2019 16:43:29 +0200 (CEST) (envelope-from per@hedeland.org) Subject: Re: ntpd configutration -- a small suggestion from the peanut gallery To: freebsd-questions@freebsd.org References: <48793.1559715528@segfault.tristatelogic.com> <20190606171120.29f7fd85@gumby.homeunix.com> <37c862b6-f623-4210-9c77-c404e31f4808@www.fastmail.com> <2ac65d8d-731e-45f6-18ba-c215704b32d9@qeng-ho.org> From: Per Hedeland Message-ID: <344cca54-6005-7b0c-703a-5a11827a6a8d@hedeland.org> Date: Fri, 7 Jun 2019 16:43:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2ac65d8d-731e-45f6-18ba-c215704b32d9@qeng-ho.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07D3E759E2 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outbound.mailhop.org header.s=dkim-high header.b=GiMr4yNU X-Spamd-Result: default: False [-5.36 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[outbound.mailhop.org:+]; MX_GOOD(-0.01)[hedeland.org,mx2.mailhop.org]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-1.11)[ipnet: 54.148.0.0/15(-4.15), asn: 16509(-1.33), country: US(-0.06)]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[78.155.228.81.zen.spamhaus.org : 127.0.0.11]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_ALLOW(-1.00)[i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[outbound.mailhop.org:s=dkim-high]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[hedeland.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[64.219.148.54.list.dnswl.org : 127.0.20.0]; R_SPF_NA(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2019 14:59:47 -0000 On 2019-06-07 16:04, Arthur Chance wrote: > On 07/06/2019 09:57, Dave Cottlehuber wrote: >> On Thu, 6 Jun 2019, at 18:14, RW via freebsd-questions wrote: >>> On Wed, 5 Jun 2019 08:40:51 +0200 (CEST) >>> Trond Endrestøl wrote: >>> >>>> On Tue, 4 Jun 2019 23:18-0700, Ronald F. Guilmette wrote: >>>> >>>>> I feel sure that I'll be able to figure out how to get ntpd properly >>>>> enabled & configured, but I would just like to offer, hunbly, to the >>>>> Powers That Be, that it would be Nice if ntpd, once enabled during >>>>> install, just worked, you know, right outta the box. >>>> >>>> Adding >>>> >>>> ntpd_sync_on_start="YES" >>>> >>>> to /etc/rc.conf is one way. >>> >>> Perhaps it should be the default. >> >> It is in CURRENT[1] & would be worth MFC although possibly too late >> for 11.3R. >> >> https://www.freebsd.org/cgi/man.cgi?query=ntpdate mentions: >> >> DESCRIPTION >> Note: The functionality o this program is now available in the ntpd(8) >> program. See the -q command line option in the ntpd(8) page. After a >> suitable period of mourning, the ntpdate utility is to be retired from >> this distribution. >> >> Perhaps a revision that uses ntpd_flags would be better? > > There is one advantage to using ntpdate_enable="YES" rather than > ntpd_sync_on_start="YES" and that's the fact that ntpdate is blocking. > When the rc script finishes you know the clock is correct, whereas with > ntpd_sync_on_start the time step can be some time after the script has > returned. If you run a daemon like dovecot that objects to time going > backwards (and dies) that can be a problem. Yes, this is a very big advantage - it can take a *very* long time for ntpd to get the clock correct, with or without the -g option a.k.a. ntpd_sync_on_start, and there is no straightforward way to find out when it has happened. But in fact the reference implementation folks do not suggest that 'ntpd -g' can be a replacement for ntpdate - as you can see in the ntpdate man page excerpt above, it points to the *-q* option to ntpd. This option is not something you can put in ntpd_flags though, see the ntpd man page - i.e. the idea is that you run 'ntpd -q', which is blocking, and "pretty fast", instead of ntpdate, and when it completes you start the ntpd daemon with whatever *other* flags you want (-g can still make sense there, in case the 'ntpd -q' failed somehow). However ntpdate is still typically significantly faster than 'ntpd -q', and in case ntpdate ever gets removed from the reference distribution (it's still present in the latest version of their development branch), I would actually hope that FreeBSD retains it and continues to make it available as an rc.conf option. --Per >> --panicgate >> >> [2]: https://www.freebsd.org/cgi/man.cgi?query=ntpd >> [1]: https://svnweb.freebsd.org/base?view=revision&revision=r326095 >> >> Author: manu >> Date: Wed Nov 22 15:27:47 2017 +0000 >> >> bsdinstall: Add ntpdate option >> >> When you install a computer for the first time, the date in the CMOS sometimes >> not accurate and you need to ntpdate as ntpd will fail a the time difference >> is too big. >> Add an option in bsdinstall to enable ntpdate that will do that for us. >> >> Reviewed by: allanjude >> Differential Revision: https://reviews.freebsd.org/D13149 >> > >