summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-29 23:56:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-29 23:56:50 +0000
commitf4bc3002f9ce4dcb1096eb1b7dadfcda01e270bc (patch)
treef913e0698c2d78cedcf8a8b4dd1cfbd44b932174 /distrib/miniroot/install.sub
parentcaedec124e78bee32a0006ed58607baad0366fdb (diff)
Revert 1.558, making the installer (in the worst case) use the base-set
localtime zone for decision making. But when we get into that situation, also skip timezone manipulation the first time (before base install) and defer it to after the base install (since that is the only time that file exists). Complicated? It could be worse.. ok krw halex
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub11
1 files changed, 9 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index a3ab3683859..31fb562a297 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.587 2009/06/19 00:42:04 krw Exp $
+# $OpenBSD: install.sub,v 1.588 2009/06/29 23:56:49 deraadt 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
@@ -1398,13 +1398,20 @@ set_timezone() {
# If configured in a previous call, return immediately
[[ -n $TZ ]] && return
+ if [[ -L /mnt/etc/localtime ]]; then
+ TZ=$(ls -l /mnt/etc/localtime 2>/dev/null)
+ TZ=${TZ#*${_zoneroot#/mnt}/}
+ fi
+
waitftplist
if [[ -s $SERVERLISTALL ]]; then
_tz=$(sed -ne '/^TZ=/s/TZ=//p' <$SERVERLISTALL)
[[ -n $_tz ]] && isin "$_tz" `cat $_zonefile` && TZ=$_tz
fi
- : ${TZ:=GMT}
+ # If neither the base or SERVERLIST gave a hint, and this is the
+ # early question, give up, and ask after the sets are installed
+ [[ $_zonefile = /var/tzlist && -z $TZ ]] && return
while :; do
_zonepath=""