summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhalex <halex@openbsd.org>2011-07-06 23:38:41 +0000
committerhalex <halex@openbsd.org>2011-07-06 23:38:41 +0000
commit5bcd1c82d967dd410350b633ef468dfaa4be2c2f (patch)
tree4b67d5a059f4c0e18f146b18aa78f04e614b272e
parentHarden the checks on the provided sets/src to make sure they are legit. (diff)
downloadwireguard-openbsd-5bcd1c82d967dd410350b633ef468dfaa4be2c2f.tar.xz
wireguard-openbsd-5bcd1c82d967dd410350b633ef468dfaa4be2c2f.zip
"Tweak previous", aka
- Globals variable names should not start with an underscore - Fetch {,x}etcNN.tgz from where we found the corresponding base (meaning it must not be the same place) "reads ok" todd@, ok krw@
-rw-r--r--distrib/miniroot/install.sub23
1 files changed, 11 insertions, 12 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index fe639a82f77..0c1517fdb86 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.641 2011/07/06 20:02:16 halex Exp $
+# $OpenBSD: install.sub,v 1.642 2011/07/06 23:38:41 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
@@ -1167,16 +1167,13 @@ install_files() {
DEFAULTSETS=$(rmel $_f $DEFAULTSETS)
GOTSETS="$GOTSETS $_f"
fi
- done
- # save arguments from the first installation source for sysmerge(8)
- if [[ -z "$FETCH_CMD" ]]; then
- FETCH_CMD="ftp $FTPOPTS -m"
- isin base$VERSION.tgz $GOTSETS && \
- _sm_args="-s $_src/etc$VERSION.tgz"
- isin xbase$VERSION.tgz $GOTSETS && \
- _sm_argx="-x $_src/xetc$VERSION.tgz"
- fi
+ # save arguments for sysmerge(8)
+ [[ $_f == base$VERSION.tgz ]] && \
+ SM_ARGS="-s $_src/etc$VERSION.tgz"
+ [[ $_f == xbase$VERSION.tgz ]] && \
+ SM_ARGSX="-x $_src/xetc$VERSION.tgz"
+ done
}
# Encode $1 as specified for usercodes and passwords in RFC 1738
@@ -1634,10 +1631,10 @@ install_sets() {
}
run_sysmerge() {
- if [[ -n "$_sm_args" || -n "$_sm_argx" ]]; then
+ if [[ -n "$SM_ARGS" || -n "$SM_ARGSX" ]]; then
ask_yn "Merge the new etc/xetc install sets using sysmerge(8)?" no
[[ $resp == y ]] && \
- /mnt/usr/sbin/chroot /mnt /usr/sbin/sysmerge $_sm_args $_sm_argx
+ /mnt/usr/sbin/chroot /mnt /usr/sbin/sysmerge $SM_ARGS $SM_ARGSX
fi
}
@@ -2003,6 +2000,8 @@ __EOT
ROOTDISK=
ROOTDEV=
package_path=
+SM_ARGS=
+SM_ARGSX=
SETDIR="$VNAME/$ARCH"
FTPDIR="pub/OpenBSD/$VNAME"