summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-05-31 00:03:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-05-31 00:03:30 +0000
commitec4487a6677f681dd5e744bf5e03990bb3e68b96 (patch)
tree5c47c05aedfe298af98aa24b2f4bd6b8a375e726 /distrib
parent5565c542a537d8f402f1d714442f51b0e3f0d8b1 (diff)
Ask the cgi to remember the install method too, and as a result, this
makes two more questions only need a return. ok krw
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/install.sh3
-rw-r--r--distrib/miniroot/install.sub31
2 files changed, 24 insertions, 10 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index c8cbb42a4ab..6b6984045b5 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sh,v 1.195 2009/05/31 00:02:50 deraadt Exp $
+# $OpenBSD: install.sh,v 1.196 2009/05/31 00:03:29 deraadt Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -202,6 +202,7 @@ if [[ -s $SERVERLIST ]]; then
_i=
[[ -n $installedfrom ]] && _i="install=$installedfrom"
[[ -n $TZ ]] && _i="$_i&TZ=$TZ"
+ [[ -n $method ]] && _i="$_i&method=$method"
[[ -n $_i ]] && ftp $FTPOPTS -a -o - \
"http://129.128.5.191/cgi-bin/ftpinstall.cgi?$_i" >/dev/null 2>&1 &
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 362cc053cea..bdd26e96719 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.561 2009/05/31 00:02:50 deraadt Exp $
+# $OpenBSD: install.sub,v 1.562 2009/05/31 00:03:29 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,7 +1398,13 @@ sane_install() {
for _s in $SANESETS; do
isin $_s $DEFAULTSETS || continue
- ask_yn "'$_s' was not installed.\nAre you *SURE* your $MODE is complete without '$_s'?"
+ # If sane_install has an argument, be quiet
+ if [[ -n $1 ]]; then
+ echo "'$_s' was not installed."
+ ask_yn "Are you *SURE* your $MODE is complete without '$_s'?"
+ else
+ resp=n
+ fi
[[ $resp == n ]] && _m="$_m $_s"
done
@@ -1410,7 +1416,7 @@ sane_install() {
# user selects from that location. Repeat as many times as the user
# needs to get all desired sets.
install_sets() {
- local _d=disk _locs="disk ftp http"
+ local _d=disk _dd _locs="disk ftp http"
echo
@@ -1418,6 +1424,10 @@ install_sets() {
ifconfig netboot > /dev/null 2>&1 && _d=ftp
[[ -x /sbin/mount_nfs ]] && _locs="$_locs nfs"
[[ -n $MTDEVS && -x /bin/mt ]] && _locs="$_locs tape"
+ if [[ -s $SERVERLISTALL ]]; then
+ _dd=$(sed -ne '/^method=/s/method=//p' <$SERVERLISTALL)
+ [[ -n $_dd ]] && _d=$_dd
+ fi
echo "Let's $MODE the sets!"
while :; do
@@ -1427,13 +1437,16 @@ install_sets() {
ask "Location of sets? ($_locs or 'done')" "$_d"
case $resp in
done) sane_install && return ;;
- c*|C*) isin "cd" $_locs && install_cdrom ;;
- d*|D*) install_disk ;;
- f*|F*) isin "ftp" $_locs && install_url ftp ;;
- h*|H*) isin "http" $_locs && install_url http ;;
- n*|N*) isin "nfs" $_locs && install_nfs ;;
- t*|T*) isin "tape" $_locs && install_tape ;;
+ c*|C*) isin "cd" $_locs && install_cdrom && method=cdrom ;;
+ d*|D*) install_disk && method=disk ;;
+ f*|F*) isin "ftp" $_locs && install_url ftp && method=ftp ;;
+ h*|H*) isin "http" $_locs && install_url http && method=http ;;
+ n*|N*) isin "nfs" $_locs && install_nfs && method=nfs ;;
+ t*|T*) isin "tape" $_locs && install_tape && method=tape ;;
esac
+
+ sane_install quiet
+ [ $? -eq 0 ] && _d=done
done
}