summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/alpha/common/install.md4
-rw-r--r--distrib/amiga/install.md4
-rw-r--r--distrib/hp300/ramdisk/install.md4
-rw-r--r--distrib/i386/common/install.md4
-rw-r--r--distrib/mac68k/ramdisk/install.md4
-rw-r--r--distrib/macppc/ramdisk/install.md4
-rw-r--r--distrib/miniroot/install.sub144
-rw-r--r--distrib/miniroot/upgrade.sh8
-rw-r--r--distrib/mvme68k/ramdisk/install.md4
-rw-r--r--distrib/mvme88k/ramdisk/install.md4
-rw-r--r--distrib/mvmeppc/ramdisk/install.md4
-rw-r--r--distrib/sparc/install.md4
-rw-r--r--distrib/sparc64/common/install.md4
-rw-r--r--distrib/sun3/install.md4
-rw-r--r--distrib/vax/install.md4
15 files changed, 55 insertions, 149 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md
index 878fd1e8fb6..194f2497200 100644
--- a/distrib/alpha/common/install.md
+++ b/distrib/alpha/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 2002/08/27 02:18:34 krw Exp $
+# $OpenBSD: install.md,v 1.15 2002/11/07 01:28:51 krw Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -38,8 +38,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDXAPERTURE=1
ARCH=ARCH
diff --git a/distrib/amiga/install.md b/distrib/amiga/install.md
index 6ea7cf0dfe8..42306cd33a6 100644
--- a/distrib/amiga/install.md
+++ b/distrib/amiga/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.20 2002/05/22 01:48:38 krw Exp $
+# $OpenBSD: install.md,v 1.21 2002/11/07 01:28:51 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -40,8 +40,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDFSTYPE=ados
MDCDDEVS='/^a\{0,1\}cd[0-9][0-9]* /s/ .*//p'
ARCH=ARCH
diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md
index d9817523198..d8ffe23aca5 100644
--- a/distrib/hp300/ramdisk/install.md
+++ b/distrib/hp300/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.34 2002/08/27 02:18:34 krw Exp $
+# $OpenBSD: install.md,v 1.35 2002/11/07 01:28:52 krw Exp $
# $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,8 +39,6 @@
# machine dependent section of installation/upgrade script
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=hp300h
MDDISKDEVS='/^hd[0-9][0-9]*:./s/:.*//p;/^sd[0-9][0-9]*:.*cylinders/s/:.*//p'
MDCDDEVS='/^sd[0-9][0-9]*:.*CD-ROM/s/:.*//p'
diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md
index 6275aebdb85..9502c79f342 100644
--- a/distrib/i386/common/install.md
+++ b/distrib/i386/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.13 2002/10/05 21:01:17 krw Exp $
+# $OpenBSD: install.md,v 1.14 2002/11/07 01:28:52 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,8 +39,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDFSTYPE=msdos
MDFSOPTS=-l
MDXAPERTURE=2
diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md
index f56d263e578..109e336e908 100644
--- a/distrib/mac68k/ramdisk/install.md
+++ b/distrib/mac68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.18 2002/10/30 21:37:40 miod Exp $
+# $OpenBSD: install.md,v 1.19 2002/11/07 01:28:52 krw Exp $
#
# Copyright (c) 2002, Miodrag Vallat.
# All rights reserved.
@@ -63,7 +63,7 @@
#
# Machine-dependent install sets
-MDSETS="bsd bsd-sbc"
+MDSETS="bsd.tgz bsd-sbc.tgz"
MDTERM=vt100
ARCH=ARCH
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md
index 4f52e2a934c..32cf8d29b5f 100644
--- a/distrib/macppc/ramdisk/install.md
+++ b/distrib/macppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.15 2002/05/20 16:53:57 krw Exp $
+# $OpenBSD: install.md,v 1.16 2002/11/07 01:28:52 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,8 +39,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDFSTYPE=msdos
MDXAPERTURE=2
ARCH=ARCH
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 50af3d0ad90..494533704db 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.269 2002/11/01 01:08:15 krw Exp $
+# $OpenBSD: install.sub,v 1.270 2002/11/07 01:28:52 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -76,6 +76,7 @@
# md_set_term() - set up terminal
#
# The following variables can be provided if required:
+# MDSETS - list of files to add to THESETS
# MDTERM - 'vt220' assumed if not provided
# MDFSTYPE - nothing assumed if not provided
# MDFSOPTS - nothing assumed if not provided
@@ -818,8 +819,11 @@ enable_network() {
# Do globbing on the selection and parse +/-. Update the global
# GET_FILES appropriately.
+#
+# $1 = user's selection (e.g. 'x*', or '-games*')
+# $2 = list of sets available from current source
glob_selection() {
- local _selection=$1 _action _f
+ local _selection=$1 _sets=$2 _action _f
# Change +/- into add/remove, but ignore bare '+' or '-'
_action=addel
@@ -836,7 +840,7 @@ glob_selection() {
[ "$_selection" = "all" ] && _selection=*
set -o noglob
- for _f in $SETS; do
+ for _f in $_sets; do
eval "case $_f in
$_selection)
GET_FILES=\`$_action $_f \$GET_FILES\`
@@ -846,78 +850,34 @@ glob_selection() {
set +o noglob
}
-# Set global SETS to either
-# 1) a list of sets found in both $1 and $THESETS, where
-# $2 is the location that generated the list of files in $1.
-# or
-# 2) a list of .tgz or .tar.gz files found in $2
-get_sets () {
- local _f _file_list=$1 _src=$2
+# Set GET_FILES to the list of sets requested by the user.
+# $1 = list of files available in source directory or url.
+# $2 = source directory or url
+get_get_files () {
+ local _files=$1 _src=$2 _sets _f
- SETS=
+ GET_FILES=
for _f in $THESETS ; do
- if [ "$_f" = "kernel" ]; then
- if isin bsd $_file_list; then
- SETS="$SETS bsd"
- fi
- elif isin ${_f}${VERSION}.tar.gz $_file_list; then
- SETS="$SETS ${_f}${VERSION}.tar.gz"
- elif isin ${_f}${VERSION}.tgz $_file_list; then
- SETS="$SETS ${_f}${VERSION}.tgz"
+ if isin $_f $_files ; then
+ _sets="$_sets $_f"
+ isin $_f $DEFAULTSETS && GET_FILES="$GET_FILES $_f"
fi
done
- if [ -z "$SETS" ]; then
+ if [ -z "$_sets" ]; then
cat << __EOT
No OpenBSD ${VERSION_MAJOR}.${VERSION_MINOR} ${MODE} sets were found in
'${_src}'
+Valid set names would be:
__EOT
- ask "Search for other *.tar.gz and *.tgz files?" y
- case $resp in
- n*|N*) return ;;
- esac
- # *.tar.gz and *.tgz are possible sets
- for _f in $_file_list ; do
- case $_f in
- *.tar.gz|*.tgz) SETS="$SETS ${_f}"
- esac
+ for _f in $THESETS ; do
+ echo " $_f"
done
- fi
-
- if [ -z "$SETS" ]; then
- ask "There are no *.tar.gz or *.tgz files in ${_src}.\nSee a directory listing?" y
- case $resp in
- n*|N*) return ;;
- esac
- echo "\n${_file_list}\n"
return
fi
-}
-
-# Set global GET_FILES to the list of sets requested by the user.
-# $1 = list of files available in source directory or url.
-# $2 = source directory or url
-get_get_files () {
- local _files=$1 _src=$2
-
- GET_FILES=
-
- get_sets "$_files" "$_src"
-
- [ "$SETS" ] || return
-
- # Set the default list of files
- for _f in $SETS ; do
- # $SETS contains only .tgz and .tar.gz file names and 'bsd'.
- case $_f in
- base*|bsd|comp*|etc*|game*|man*|misc*)
- isin $_f $SETSDONE || GET_FILES=`addel $_f $GET_FILES`
- ;;
- esac
- done
# Allow the user to select/de-select additional sets
while : ; do
@@ -928,24 +888,14 @@ all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.
__EOT
- do_selection_list "$SETS" "$GET_FILES" "File Name?"
+ do_selection_list "$_sets" "$GET_FILES" "File Name?"
[ "$resp" = "done" ] && break
- glob_selection "$resp"
+ glob_selection "$resp" "$_sets"
done
}
-# Ensure that $1 (if present) is the last element in $GET_FILES.
-make_last_set () {
- local _set=$1
-
- if isin $_set $GET_FILES; then
- GET_FILES=`rmel $_set $GET_FILES`
- GET_FILES=`addel $_set $GET_FILES`
- fi
-}
-
# Install the list of files in the global GET_FILES from the source
# named in $1. Display an error message for failed installs so the
# user will know to try again.
@@ -957,24 +907,14 @@ install_get_files () {
n*|N*) return ;;
esac
- # Ensure that siteXX.tgz and siteXX.tar.gz are the *last* sets
- # installed so their contents overwrite the contents of the
- # other sets, not the other way around. By selecting sets out
- # of order, the user can cause a set other than siteXX to be
- # the last set in GET_FILES.
-
- make_last_set "site${VERSION}.tgz"
- make_last_set "site${VERSION}.tar.gz"
-
echo
- for _f in $GET_FILES ; do
+ for _f in $THESETS ; do
+ isin $_f $GET_FILES || continue
echo "Getting ${_f} ..."
case $_f in
- *.tar.gz|*.tgz)
- ftp ${_ftp_active} -o - -V -m "${_src}/${_f}" | tar zxpf - -C /mnt
+ *.tgz) ftp ${_ftp_active} -o - -V -m "${_src}/${_f}" | tar zxpf - -C /mnt
;;
- *)
- ftp ${_ftp_active} -o "/mnt/${_f}" -V -m "${_src}/${_f}"
+ *) ftp ${_ftp_active} -o "/mnt/${_f}" -V -m "${_src}/${_f}"
;;
esac
if [ $? -ne 0 ]; then
@@ -1523,17 +1463,6 @@ set_timezone() {
done
}
-# Remove $1 from $SETSDONE, taking account of the different
-# possible suffixes - none for bsd, .tgz or .tar.gz for the
-# other sets.
-set_not_done () {
- local _set=$1
-
- SETSDONE=`rmel $_set $SETSDONE`
- SETSDONE=`rmel ${_set}.tgz $SETSDONE`
- SETSDONE=`rmel ${_set}.tar.tgz $SETSDONE`
-}
-
# Check that required sets were successfully installed by checking
# for the presence of a 'random' selection of their contents.
#
@@ -1549,7 +1478,7 @@ sane_install() {
# Check if bsd is installed and >0 bytes in size.
if [[ ! -s /mnt/bsd ]]; then
_insane=y
- set_not_done bsd
+ SETSDONE=`rmel bsd $SETSDONE`
cat << __EOT
*** /bsd is not present in the installed system, or is 0 bytes long. OpenBSD
@@ -1560,7 +1489,7 @@ __EOT
# Check if baseXX is installed.
if [[ ! -x /mnt/bin/cat || ! -x /mnt/dev/MAKEDEV ]]; then
_insane=y
- set_not_done base${VERSION}
+ SETSDONE=`rmel base${VERSION}.tgz $SETSDONE`
cat << __EOT
*** One or both of the executable files /bin/cat and /dev/MAKEDEV are not
@@ -1572,7 +1501,7 @@ __EOT
# Check if etcXX is installed.
if [[ ! -d /mnt/etc || ! -d /mnt/usr/share/zoneinfo || ! -d /mnt/dev ]]; then
_insane=y
- set_not_done etc${VERSION}
+ SETSDONE=`rmel etc${VERSION}.tgz $SETSDONE`
cat << __EOT
*** One or more of the directories /etc, /usr/share/zoneinfo and /dev are not
@@ -1995,12 +1924,19 @@ IFDEVS=`get_ifdevs`
# Devices created with makedev().
DEVSMADE=
-# $MDSETS is the list of kernels for an architecture.
-# extra "site" set can be provided by person doing install or upgrade.
-THESETS="$MDSETS base etc misc comp man game xbase xshare xfont xserv site"
+# Selected sets will be installed in the order they are listed in $THESETS.
+# Ensure that siteXX.tgz is the *last* set listed so its contents overwrite
+# the contents of the other sets, not the other way around.
+THESETS="bsd $MDSETS"
+DEFAULTSETS="bsd"
+for _set in base etc misc comp man game xbase xshare xfont xserv site ; do
+ [[ $MODE == upgrade && $_set == etc ]] && continue
+ THESETS="$THESETS ${_set}${VERSION}.tgz"
+ isin $_set xbase xshare xfont xserv site && continue
+ DEFAULTSETS="$DEFAULTSETS ${_set}${VERSION}.tgz"
+done
# Global variable using during sets installation
-SETS=
SETSDIR=
SETSDONE=
GET_FILES=
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh
index d67f902b36d..6ac75183fdb 100644
--- a/distrib/miniroot/upgrade.sh
+++ b/distrib/miniroot/upgrade.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.44 2002/11/01 00:39:19 krw Exp $
+# $OpenBSD: upgrade.sh,v 1.45 2002/11/07 01:28:52 krw Exp $
# $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -50,12 +50,6 @@ MODE=upgrade
# include common subroutines and initialization code
. install.sub
-# Remove 'etc' set from THESETS. It should be installed
-# manually, after the upgrade. Note that etc should not
-# be the first or last set in THESETS, or this won't
-# work!
-THESETS=`echo $THESETS | sed -e 's/ etc / /'`
-
# Have the user confirm that $ROOTDEV is the root filesystem.
resp=
while [ -z "$resp" ]; do
diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md
index 5662cd5bc9d..773e8d1f95f 100644
--- a/distrib/mvme68k/ramdisk/install.md
+++ b/distrib/mvme68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.22 2002/05/20 16:53:57 krw Exp $
+# $OpenBSD: install.md,v 1.23 2002/11/07 01:28:52 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -38,8 +38,6 @@
#
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=vt100
ARCH=ARCH
diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md
index 3da689c5f8c..58a2f9b857e 100644
--- a/distrib/mvme88k/ramdisk/install.md
+++ b/distrib/mvme88k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.17 2002/05/20 16:53:57 krw Exp $
+# $OpenBSD: install.md,v 1.18 2002/11/07 01:28:52 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -38,8 +38,6 @@
#
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=vt100
ARCH=ARCH
diff --git a/distrib/mvmeppc/ramdisk/install.md b/distrib/mvmeppc/ramdisk/install.md
index 946ade73d7d..87a6ba2bce5 100644
--- a/distrib/mvmeppc/ramdisk/install.md
+++ b/distrib/mvmeppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 2002/05/20 16:53:57 krw Exp $
+# $OpenBSD: install.md,v 1.15 2002/11/07 01:28:52 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,8 +39,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=vt100
MDFSTYPE=msdos
ARCH=ARCH
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md
index 85459c733cc..7d38d5536aa 100644
--- a/distrib/sparc/install.md
+++ b/distrib/sparc/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.46 2002/09/24 23:45:05 deraadt Exp $
+# $OpenBSD: install.md,v 1.47 2002/11/07 01:28:52 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -40,8 +40,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=sun
MDDISKDEVS='/^sd[0-9] /s/ .*//p;/^x[dy][0-9] /s/ .*//p'
ARCH=ARCH
diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md
index c83a71849d0..a95c9e1077c 100644
--- a/distrib/sparc64/common/install.md
+++ b/distrib/sparc64/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 2002/09/24 23:45:05 deraadt Exp $
+# $OpenBSD: install.md,v 1.15 2002/11/07 01:28:52 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -40,8 +40,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=sun
MDXAPERTURE=1
ARCH=ARCH
diff --git a/distrib/sun3/install.md b/distrib/sun3/install.md
index 58735f415cd..b4f8d7d3a31 100644
--- a/distrib/sun3/install.md
+++ b/distrib/sun3/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 2002/09/24 23:45:05 deraadt Exp $
+# $OpenBSD: install.md,v 1.15 2002/11/07 01:28:52 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,8 +39,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=sun
MDDISKDEVS='/^sd[0-9] /s/ .*//p;/^x[dy][0-9] /s/ .*//p'
ARCH=ARCH
diff --git a/distrib/vax/install.md b/distrib/vax/install.md
index 79409992202..52fd09d756c 100644
--- a/distrib/vax/install.md
+++ b/distrib/vax/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.19 2002/09/24 23:45:05 deraadt Exp $
+# $OpenBSD: install.md,v 1.20 2002/11/07 01:28:52 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -40,8 +40,6 @@
# machine dependent section of installation/upgrade script.
#
-# Machine-dependent install sets
-MDSETS=kernel
MDTERM=vt100
MDDISKDEVS='/^[hs]d[0-9] /s/ .*//p;/^r[al][0-9] /s/ .*//p'
MDCDDEVS='/^cd[0-9] /s/ .*//p;/^ra[0-9] .* RRD40$/s/ .*//p'