From owner-svn-src-head@freebsd.org Thu Nov 23 15:26:35 2017 Return-Path: Delivered-To: svn-src-head@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 2DD63DEFDE5; Thu, 23 Nov 2017 15:26:35 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2243C6F9B2; Thu, 23 Nov 2017 15:26:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 1cfe533f; Thu, 23 Nov 2017 16:26:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=ugtfaBy5JKLgO7tLrmc5iRlvZ9g=; b=qZDBHwhURdJ5jfA2N1PYdvTFNss2 i8An/7pUtCxMjIdp0NtfvpSDoIn4D+0yzQORaVxRDzJ69eWUV5rqVWUzgz9LxxCt 7nTDewiVGptFLwzCeHsUcXPFia8Cz4oHD+a2ABjLNYoEovYb7lSc9Ae5d7kVdZAR MdSQftlDNizWQKk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=Mm0E30Z6lQU0Gfmgz082fgxhwAmFANFRXqzOUj1rTij5akbxNfF5LIpr kbQyxT3CYVwtzxabM8xfaEUE7IcGUmQyO7kTPOe9XmG5yaG/ot2KQ9gt5tt/wDIb TVPzpHl5m/GkVvyUH3Pm2n25ph+VutMJlYydyEahLDM6UuGfxIo= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 8a4a47b9 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 23 Nov 2017 16:26:31 +0100 (CET) Date: Thu, 23 Nov 2017 16:26:30 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Devin Teske , Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326095 - head/usr.sbin/bsdinstall/scripts Message-Id: <20171123162630.527cc0b29f81c4e571883dad@bidouilliste.com> In-Reply-To: <201711231517.vANFHnwR091356@pdx.rh.CN85.dnsmgr.net> References: <20171123160815.2f467f760179901a0ba983f1@bidouilliste.com> <201711231517.vANFHnwR091356@pdx.rh.CN85.dnsmgr.net> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 15:26:35 -0000 On Thu, 23 Nov 2017 07:17:49 -0800 (PST) "Rodney W. Grimes" wrote: > > On Thu, 23 Nov 2017 06:56:50 -0800 (PST) > > "Rodney W. Grimes" wrote: > > > > > > > > > > Hi Devin, > > > > > > > > On Thu, 23 Nov 2017 01:33:39 -0800 > > > > Devin Teske wrote: > > > > > > > > > > > > > > > > > > > > On Nov 22, 2017, at 11:15 PM, Emmanuel Vadot wrote: > > > > > > > > > > > >> On 2017-11-22 17:38, Ian Lepore wrote: > > > > > >>> On Wed, 2017-11-22 at 15:27 +0000, Emmanuel Vadot wrote: > > > > > >>> Author: manu > > > > > >>> Date: Wed Nov 22 15:27:47 2017 > > > > > >>> New Revision: 326095 > > > > > >>> URL: https://svnweb.freebsd.org/changeset/base/326095 > > > > > >>> Log: > > > > > >>> 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 > > > > > >>> Modified: > > > > > >>> head/usr.sbin/bsdinstall/scripts/services > > > > > >>> Modified: head/usr.sbin/bsdinstall/scripts/services > > > > > >>> ============================================================================== > > > > > >>> --- head/usr.sbin/bsdinstall/scripts/services Wed Nov 22 15:18:11 2017 (r326094) > > > > > >>> +++ head/usr.sbin/bsdinstall/scripts/services Wed Nov 22 15:27:47 2017 (r326095) > > > > > >>> @@ -46,6 +46,8 @@ DAEMONS=$( dialog --backtitle "FreeBSD Installer" \ > > > > > >>> local_unbound "Local caching validating resolver" ${local_unbound:-off} \ > > > > > >>> sshd "Secure shell daemon" ${sshd_enable:-off} \ > > > > > >>> moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ > > > > > >>> + ntpdate "Synchronize system and network time at bootime" \ > > > > > >>> + ${ntpdate_enable:-off} \ > > > > > >>> ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ > > > > > >>> powerd "Adjust CPU frequency dynamically if supported" \ > > > > > >>> ${powerd_enable:-off} \ > > > > > >> The right way to enable a time-step at boot is to set the rc conf > > > > > >> variable ntpd_sync_on_start to YES. ntpdate has been deprecated for > > > > > >> *years*. > > > > > >> -- Ian > > > > > > > > > > > > Hi Ian, > > > > > > > > > > > > Thanks I didn't know about option -g (nor ntpd_sync_on_start), this bring a few questions : > > > > > > > > > > > > - Is there any reason to not always use -g for ntpd ? As a lambda user I just want my time to be set, no matter what. > > > > > > - Should we remove ntpdate in -current before 12 if it's deprecated ? > > > > > > > > > > > > I'll make the necessary changes according to your (or others) answers. > > > > > > > > > > > > > > > > I would not remove ntpdate. > > > > > > I concur, as ntpdate is trivial to use, ntpd -pg requires a proper /etc/ntp.conf, > > > though that is trival too you well not get what you want if you do not have > > > that. > > > > From the website you linked after they say to use : > > ntpd -gqc /dev/null server1.name.net server2.name.org server3.name.com > > for use without ntp.conf. > > I do not think you want to do that, as if you read just a bit further you see: > > Possible hitch: ntpd will step the time adjustment if it is more > than 128ms (default). This means that a 128ms adjustment will take > 256 seconds to apply. We want an option to step any initial offset, > I suspect. > > So even the ntp folks seem to have issues with replacing ntpdate.... There is -G for that. > > Also we do provide an ntp.conf so ... > > We do, a template, all commented out, and does not work for > machines behind strong firewalls that wont allow ntp out > to the net but have internal ntp servers that are used for > such things. > > Well maybe not all commented out, I think it defaults to > some public pools. I believe it would be missing iburst > for use with ntp -pg Nope, see : https://svnweb.freebsd.org/base/head/etc/ntp.conf?revision=311103&view=markup#l32 > > > > > > > Is there a way to make ntpd sync and then quit immediately? > > > > > > > > Just by reading the man I see the -q option which does exactly that. > > > > Setting both -q and -g should have the same behavior than ntpdate (not > > > > tested). > > > > > > ntpd -pg is the preferred method per the ntp.org documentation: > > > https://support.ntp.org/bin/view/Dev/DeprecatingNtpdate > > > > -gq like I said but it's good to have an official reference. > > > > > > > > > > > If not, sounds like ntpdate serves a purpose not filled by ntpd. > > > > > > > > > > Valid case is someone running a VM that gets paused for days, weeks, or even months at a time. On such a VM it may make more sense to let the clock be only sporadically managed in an adhoc manner. > > > > > > > > > > I personally like to use ntpdate on said VMs because I generally set a timeout on my ssh-agent in said VMs and by managing the clock manually allows me to better control keys loaded. > > > > > > > > > > Pretty sure other people may have other reasons for non-daemonized clock management. > > > > > > > > That's why I asked :) > > > > > > I think that the ntp distribution still contains ntpdate, so long as that is true > > > we should continue to include it in FreeBSD. When/if they remove it from the > > > official ntp distribution then this issue shall need a revist. > > > > I haven't checked. > > We can also add a shell script that does what I quoted above. > > We could, but that gets us the bug of time wont be stepped if > correct within 128mS and causing a long slow 4 minute slew event. > > > > > > Devin > > > > Emmanuel Vadot > > > Rod Grimes rgrimes@freebsd.org > > Emmanuel Vadot > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot