diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-05-08 23:01:48 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-05-08 23:01:48 +0000 |
commit | 32a26d8360637b9a9ae41a4b77f7ba7f5f2eb352 (patch) | |
tree | 860c979d83a9aebcf9b121766a16e143062ea6a7 /distrib/miniroot | |
parent | 6cb2a4b6d953662fe7902f963ab0de3e0d351d2e (diff) |
Abstract out common md_set_term() code into set_term() in install.sub,
calling md_set_term() from set_term() to do machine dependent stuff.
Currently only i386 does anything - keyboard mappings.
Add MDTERM variable to allow install.md to set proper default terminal
type. Default to vt220.
Eliminate md_get_partition_range() as useless since every architecture
returned '[a-p]'.
Make default term for all mvme* architectures vt100 as requested by miod@.
ok deraadt@ millert@ miod@
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sub | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index c8850473e96..e1432b60504 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.218 2002/05/04 22:21:21 krw Exp $ +# $OpenBSD: install.sub,v 1.219 2002/05/08 23:01:46 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 @@ -67,22 +67,33 @@ # OpenBSD install/upgrade script common subroutines and initialization code -# include machine-dependent functions +# Include machine-dependent functions and definitions. +# # The following functions must be provided: -# md_get_diskdevs() - return available disk devices -# md_get_cddevs() - return available CD-ROM devices -# md_get_partition_range() - return range of valid partition letters -# md_installboot() - install boot-blocks on disk -# md_prep_disklabel() - label the root disk -# md_welcome_banner() - display friendly message +# md_congrats() - display friendly message +# md_get_cddevs() - return available CD-ROM devices +# md_get_diskdevs() - return available disk devices +# md_installboot() - install boot-blocks on disk +# md_native_fsopts() - native filesystem options for disk installs +# md_native_fstype() - native filesystem type for disk installs # md_not_going_to_install() - display friendly message -# md_congrats() - display friendly message -# md_native_fstype() - native filesystem type for disk installs -# md_native_fsopts() - native filesystem options for disk installs - -# include machine dependent subroutines +# md_prep_disklabel() - label the root disk +# md_set_term() - set up terminal +# md_welcome_banner() - display friendly message +# +# The following variables can be provided if required: +# MDTERM - 'vt220' assumed if not provided . install.md +set_term() { + [ "$TERM" ] && return + ask "Specify terminal type:" ${MDTERM:-vt220} + TERM=$resp + export TERM + + md_set_term +} + # Ask for a password, saving the input in $resp. # Display $1 as the prompt. # *Don't* allow the '!' options that ask does. @@ -1211,7 +1222,7 @@ install_from_mounted_fs() { } install_cdrom() { - local _drive _range _part _fstype _directory _n + local _drive _part _fstype _directory _n # Get the cdrom device info if [ -z "$_CDDEVS" ]; then @@ -1268,12 +1279,11 @@ __EOT _part=c else # Get partition from user - _range=`md_get_partition_range` resp= while [ -z "$resp" ] ; do ask "CD-ROM partition to mount? (normally 'c')" c case $resp in - $_range) + [a-p]) _part=$resp ;; *) echo "Invalid response: $resp" @@ -2152,7 +2162,7 @@ y*|Y*) echo "\nCool! Let's get to it...\n" esac # Deal with terminal issues -md_set_term +set_term cat << __EOT |