From owner-svn-src-stable-11@freebsd.org Tue Nov 28 20:44:30 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EF21DEE5FE for ; Tue, 28 Nov 2017 20:44:30 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33ABD77DC2; Tue, 28 Nov 2017 20:44:29 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Jmjsei6CDRDG7JmjueUS2I; Tue, 28 Nov 2017 13:44:23 -0700 X-Authority-Analysis: v=2.2 cv=b+PC2pOx c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=sC3jslCIGhcA:10 a=XldT38RWNwACPDQzwzUA:9 a=6I5d2MoRAAAA:8 a=YQBJvEm4w-0w1om_S0AA:9 a=CjuIK1q_8ugA:10 a=Lpbxee8xIhUy-rPc7vMA:9 a=hquHOILUSkIA:10 a=YxBL1-UpAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 3C4076FF; Tue, 28 Nov 2017 12:44:20 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vASKi2R3004639; Tue, 28 Nov 2017 12:44:02 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vASKi0Md004634; Tue, 28 Nov 2017 12:44:01 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201711282044.vASKi0Md004634@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andre Albsmeier cc: Cy Schubert , svn-src-stable-11@freebsd.org Subject: Re: svn commit: r325256 - in stable/11/etc: periodic/daily rc.d In-Reply-To: Message from Andre Albsmeier of "Tue, 28 Nov 2017 14:44:49 +0100." <20171128134449.GA2549@voyager> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1511901748_271730" Date: Tue, 28 Nov 2017 12:44:00 -0800 X-CMAE-Envelope: MS4wfN+U4U2qwiXkYXyW3UrXM4kiOeYUIS9Il2xLCeIw0IengjTJkEO3+MOJJXbV3MAEd8Gzb8INkCCECCvM5rWBAnRQ2YwSV5u8sxgmvzrKi8DEVKwOD28n 8sn8KVNsINEiT7inLGKfGf0ek5rknhOpdq2vAbep4Sz+MNVcpGJxxZppGqN9+fHViJ1XBZpoxNAQSbi1qepmdxQHTtCQF598oSssHHS4QdRHefUCd/or23kn Xhamsa0VNmFc5/hRn4UMiw== X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2017 20:44:30 -0000 This is a multipart MIME message. --==_Exmh_1511901748_271730 Content-Type: text/plain; charset=us-ascii In message <20171128134449.GA2549@voyager>, Andre Albsmeier writes: > On Wed, 01-Nov-2017 at 01:03:44 +0000, Cy Schubert wrote: > > Author: cy > > Date: Wed Nov 1 01:03:44 2017 > > New Revision: 325256 > > URL: https://svnweb.freebsd.org/changeset/base/325256 > > > > Log: > > MFC r324681, r324738 > > > > Anticongestion refinements for ntpd rc script. This checks if ntp > > leapfile needs fetching before entering into the anticongestion sleep. > > I wonder if this will ever actually fetch leapfiles ;-) > > When ntpd_fetch_leapfile() is called, $ntp_tmp_leapfile will be > empty as it was declared local in ntpd_needfetch_leapfile() resulting in: > > usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [--bind-address=host] > [--ca-cert=file] [--ca-path=dir] [--cert=file] [--crl=file] > [-i file] [--key=file] [-N file] [--no-passive] [--no-proxy=list] > ... > > since the argument to fetch's -o is missing... Either we duplicate > > ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" > > in ntpd_fetch_leapfile() or remove it from the local list in > ntpd_needfetch_leapfile() (which is hacky as this will require > ntpd_needfetch_leapfile() being called before each ntpd_fetch_leapfile()) > or we simply put > > ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" > > on top of the script and remove other assignments and local defs... The correct thing is to make $ntp_tmp_leapfile global. There's been a fair bit of churn in this file due to the controversial anticongestion. This was missed. --==_Exmh_1511901748_271730 Content-Type: text/plain ; name="ntpd.diff"; charset=us-ascii Content-Description: ntpd.diff Content-Disposition: attachment; filename="ntpd.diff" Index: etc/rc.d/ntpd =================================================================== --- etc/rc.d/ntpd (revision 326308) +++ etc/rc.d/ntpd (working copy) @@ -19,6 +19,7 @@ fetch_cmd="ntpd_fetch_leapfile" needfetch_cmd="ntpd_needfetch_leapfile" start_precmd="ntpd_precmd" +ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" load_rc_config $name @@ -92,7 +93,7 @@ } ntpd_needfetch_leapfile() { - local ntp_tmp_leapfile rc verbose + local rc verbose if checkyesno ntp_leapfile_fetch_verbose; then verbose=echo @@ -100,8 +101,6 @@ verbose=: fi - ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" - ntp_ver_no_src=$(get_ntp_leapfile_ver $ntp_src_leapfile) ntp_expiry_src=$(get_ntp_leapfile_expiry $ntp_src_leapfile) ntp_ver_no_db=$(get_ntp_leapfile_ver $ntp_db_leapfile) --==_Exmh_1511901748_271730 Content-Type: text/plain; charset=us-ascii Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. --==_Exmh_1511901748_271730--