From 87b19f0fb6f5ca691e30f241a1d2dd0760605fcf Mon Sep 17 00:00:00 2001 From: Alexander Hall Date: Mon, 8 Aug 2011 15:41:18 +0000 Subject: revert the last commit and do the right thing instead. tested and ok krw@, "get it in" deraadt@ --- distrib/miniroot/install.sub | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 5f210e4096e..375fa41e92e 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.651 2011/08/07 15:07:22 krw Exp $ +# $OpenBSD: install.sub,v 1.652 2011/08/08 15:41:17 halex Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -1553,30 +1553,26 @@ set_timezone() { "") continue ;; "?") grep -v /. $_zonefile | showcols continue ;; - *+([[:space:]])*) - echo "'$_zonepath' is not a valid timezone on this system." - continue ;; esac - while isin $_zonepath/ $(cat $_zonefile); do + while isin "$_zonepath/" $(cat $_zonefile); do ask "What sub-timezone of '$_zonepath' are you in? ('?' for list)" _zsed=$(echo $_zonepath/ | sed 's,/,\\/,g') resp=${resp%%*(/)} case $resp in "") ;; "?") sed -n "/^$_zsed/{s/$_zsed//;/\/./!p;}" $_zonefile | showcols ;; - *+([[:space:]])*) - echo "'$_zonepath/$resp' is not a valid timezone on this system." ;; *) _zonepath=$_zonepath/$resp ;; esac done - if isin $_zonepath $(cat $_zonefile); then + if isin "$_zonepath" $(cat $_zonefile); then TZ=${_zonepath#$_zoneroot} return fi - echo "'${_zonepath}' is not a valid timezone on this system." + echo -n "'${_zonepath}'" + echo " is not a valid timezone on this system." done } -- cgit v1.2.3