diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2009-06-03 06:07:38 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2009-06-03 06:07:38 +0000 |
commit | 8fe82d00a3725c9f4e47cc8fe900bd088ed42a55 (patch) | |
tree | bb9cfd4cb77ad92a8b4eb16df81cdfa3fb629970 /distrib/miniroot/install.sub | |
parent | f67f3c5f218529717ef3c547f2d0688006ab222c (diff) |
make sure timezone and sets location gets sane defaults
ok krw@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r-- | distrib/miniroot/install.sub | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index b5ff490b400..b28da7f0fac 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.570 2009/06/03 00:30:31 krw Exp $ +# $OpenBSD: install.sub,v 1.571 2009/06/03 06:07:37 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 @@ -1336,7 +1336,7 @@ set_timezone() { waitftplist if [[ -s $SERVERLISTALL ]]; then _tz=$(sed -ne '/^TZ=/s/TZ=//p' <$SERVERLISTALL) - [[ -n $_tz ]] && TZ=$_tz + [[ -n $_tz ]] && isin "$_tz" `cat $_zonefile` && TZ=$_tz fi : ${TZ:=GMT} @@ -1405,6 +1405,12 @@ install_sets() { [[ -n $MTDEVS && -x /bin/mt ]] && _locs="$_locs tape" : ${_d:=disk} + if ! isin "$_d" $_locs; then + for a in ftp http cd nfs tape disk; do + isin $a $_locs && _d=$a && break + done + fi + echo "Let's $MODE the sets!" while :; do umount -f /mnt2 >/dev/null 2>&1 |