From ad0d703221e5f3cf2033e381a2346c3c12fbee29 Mon Sep 17 00:00:00 2001 From: Robert Peichaer Date: Sat, 9 Apr 2016 15:14:48 +0000 Subject: Remove _tz as intermediate variable and use CGI_TZ directly. Feedback from and OK halex@ OK krw@ for a similar diff --- distrib/miniroot/install.sub | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index aea7da74c8d..278d4f3f2ab 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.889 2016/04/09 11:03:42 rpe Exp $ +# $OpenBSD: install.sub,v 1.890 2016/04/09 15:14:47 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -1766,7 +1766,7 @@ ask_root_sshd() { # Set TZ variable based on zonefile $1 and user selection. set_timezone() { - local _zonefile=$1 _zonepath _zsed _tz _zoneroot=/usr/share/zoneinfo + local _zonefile=$1 _zonepath _zsed _zoneroot=/usr/share/zoneinfo # If the timezone file is not available, # return immediately. @@ -1781,10 +1781,7 @@ set_timezone() { fi waitcgiinfo - if [[ -n $CGI_TZ ]]; then - _tz=$CGI_TZ - [[ -n $_tz ]] && isin "$_tz" $(<$_zonefile) && TZ=$_tz - fi + isin "$CGI_TZ" $(<$_zonefile) && TZ=$CGI_TZ # If neither the base or HTTP_LIST gave a hint, and this is the # early question, give up, and ask after the sets are installed. -- cgit v1.2.3