From owner-svn-src-head@freebsd.org Thu Nov 23 16:12:01 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 A3F16DF0E2C for ; Thu, 23 Nov 2017 16:12:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 85AD3711D1 for ; Thu, 23 Nov 2017 16:12:01 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 0e3dfbaf-d069-11e7-97f4-9d8903e843e3 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 0e3dfbaf-d069-11e7-97f4-9d8903e843e3; Thu, 23 Nov 2017 16:12:09 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id vANGBt3Q003323; Thu, 23 Nov 2017 09:11:55 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1511453515.46031.19.camel@freebsd.org> Subject: Re: svn commit: r326095 - head/usr.sbin/bsdinstall/scripts From: Ian Lepore To: rgrimes@freebsd.org, Emmanuel Vadot Cc: Devin Teske , Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 23 Nov 2017 09:11:55 -0700 In-Reply-To: <201711231456.vANEuodh091276@pdx.rh.CN85.dnsmgr.net> References: <201711231456.vANEuodh091276@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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 16:12:01 -0000 On Thu, 2017-11-23 at 06:56 -0800, 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. > > > > > > > > > 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 > > > > > > > > > > > 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 tend to agree with this... it's the ntpd project that deprecated ntpdate years ago, but as long as it's included in their distributions, we should include it in ours.  But I also think we shouldn't add new uses of it when there are alternatives available. -- Ian