summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2016-09-10 22:34:18 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2016-09-10 22:34:18 +0000
commit5a996f81f5f1fa975b23c4becb995cceea77dc17 (patch)
tree4a0c9a3a930c0160a27851e4ed77c94307e0219f /distrib
parent8e7c9a02411643f9a70397a5de15ec6b2d48d464 (diff)
Ensure that a previous cdrom install method is passed through
to install_sets() and that it is presented as default answer. - fix pattern in waitcgiinfo() to match method=cd0. - use a separate variable _im to set INSTALL_METHOD resp might get overwritten in install_cdrom() OK halex
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/install.sub13
1 files changed, 7 insertions, 6 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 40ac2bafefb..e2ae2eea2d6 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.915 2016/09/10 17:18:30 rpe Exp $
+# $OpenBSD: install.sub,v 1.916 2016/09/10 22:34:17 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -79,9 +79,9 @@ waitcgiinfo() {
while IFS='=' read -r -- _key _val; do
case $_key=$_val in
- method=+([a-z])) CGI_METHOD=$_val;;
- TIME=+([0-9])) CGI_TIME=$_val;;
- TZ=+([-_/+[:alnum:]])) CGI_TZ=$_val;;
+ method=+([a-z])*([0-9])) CGI_METHOD=$_val;;
+ TIME=+([0-9])) CGI_TIME=$_val;;
+ TZ=+([-_/+[:alnum:]])) CGI_TZ=$_val;;
esac
done <$CGI_INFO
}
@@ -2283,7 +2283,7 @@ feed_random() {
# selects from that location. Repeat as many times as the user needs to get all
# desired sets.
install_sets() {
- local _cddevs=$(get_cddevs) _d=$CGI_METHOD _locs="disk http" _src
+ local _cddevs=$(get_cddevs) _d=$CGI_METHOD _im _locs="disk http" _src
echo
@@ -2310,7 +2310,8 @@ install_sets() {
[cC]*) if [[ -n $_cddevs ]]; then
set -- $_cddevs
[[ $resp == [cC]?([dD]) ]] && resp=$1
- install_cdrom $resp && INSTALL_METHOD=$resp
+ _im=$resp
+ install_cdrom $resp && INSTALL_METHOD=$_im
fi
;;
[dD]*) install_disk && INSTALL_METHOD=disk