summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhalex <halex@openbsd.org>2009-06-03 06:07:37 +0000
committerhalex <halex@openbsd.org>2009-06-03 06:07:37 +0000
commit490787b9b0485709c135a890f936c79b71f7e794 (patch)
tree17b88b575a5c68607f833f19e3e94e2f103a43e0
parentset IFF_ALLMULTI properly also when in promiscuous mode and some (diff)
downloadwireguard-openbsd-490787b9b0485709c135a890f936c79b71f7e794.tar.xz
wireguard-openbsd-490787b9b0485709c135a890f936c79b71f7e794.zip
make sure timezone and sets location gets sane defaults
ok krw@
-rw-r--r--distrib/miniroot/install.sub10
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