From owner-svn-src-head@freebsd.org Thu Jul 14 00:18:53 2016 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 092D4B98947; Thu, 14 Jul 2016 00:18:53 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3BAC1395; Thu, 14 Jul 2016 00:18:52 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-124.airbears2.berkeley.edu [136.152.142.124]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u6E0IjX4020574 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 13 Jul 2016 17:18:45 -0700 Subject: Re: svn commit: r302790 - head/usr.sbin/bsdinstall/scripts To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201607132349.u6DNnknJ012881@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <929a22c0-e16a-7ddf-3303-025f25faed3a@freebsd.org> Date: Wed, 13 Jul 2016 17:18:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201607132349.u6DNnknJ012881@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbNv2RdkaFRJkCiAV7wnY+SwX17EQQhZsCAYX/R3LAKadYQX29kMteqiiATGXP1DZno0PsrUgoxEx1PZURassmUVUgmLhOt1ag= X-Sonic-ID: C;OEvkhlhJ5hGfw5NwxPCmMQ== M;rIwph1hJ5hGfw5NwxPCmMQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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, 14 Jul 2016 00:18:53 -0000 Can you please make this dialog default to "skip" for people with systems where the time is set correctly? I realize "OK" is usually a no-op, so the "just press enter" is maintained, but "skip" is even more of a no-op. -Nathan On 07/13/16 16:49, Allan Jude wrote: > Author: allanjude > Date: Wed Jul 13 23:49:45 2016 > New Revision: 302790 > URL: https://svnweb.freebsd.org/changeset/base/302790 > > Log: > bsdinstall: Prompt user to set the date and time after selecting timezone > > Not having the correct date and time makes many PKI based things not work > > In 10 and 11, it can mean that Unbound, ntpd, and sshd won't start > > Submitted by: des (original patch) > MFC after: 7 days > > Modified: > head/usr.sbin/bsdinstall/scripts/time > > Modified: head/usr.sbin/bsdinstall/scripts/time > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/time Wed Jul 13 23:03:34 2016 (r302789) > +++ head/usr.sbin/bsdinstall/scripts/time Wed Jul 13 23:49:45 2016 (r302790) > @@ -26,4 +26,40 @@ > # > # $FreeBSD$ > > +# Select timezone > chroot $BSDINSTALL_CHROOT tzsetup > + > +# Switch to target timezone > +saved_TZ="$TZ" > +TZ="${BSDINSTALL_CHROOT}/etc/localtime" > +export TZ > + > +# Set date > +exec 3>&1 > +DATE=$(dialog --backtitle 'FreeBSD Installer' \ > + --title 'Time & Date' \ > + --ok-label 'Set Date' \ > + --cancel-label 'Skip' \ > + --date-format '%Y%m%d%H%M.%S' \ > + --calendar '' 2 40 \ > +2>&1 1>&3) && date $DATE > +exec 3>&- > + > +# Set time > +exec 3>&1 > +TIME=$(dialog --backtitle 'FreeBSD Installer' \ > + --title 'Time & Date' \ > + --ok-label 'Set Time' \ > + --cancel-label 'Skip' \ > + --time-format '%H%M.%S' \ > + --timebox '' 2 40 \ > +2>&1 1>&3) && date $TIME > +exec 3>&- > + > +# Switch back > +if [ -n "$saved_TZ" ]; then > + TZ="$saved_TZ" > +else > + unset TZ > +fi > +unset saved_TZ >