diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-03-27 15:13:51 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-03-27 15:13:51 +0000 |
commit | ded4c224c14fcbb0744530f0e7523d317015b910 (patch) | |
tree | 369638d64e250af5c75f60adb2a08c70401ae87b /distrib | |
parent | 55228758d24331fcf06319f14dfbfc321edf2ba0 (diff) |
Use new skeleton kbd(8) '-l' to generalize kbd(8) use. Eliminate
fixed list of available maps and machine dependant md_set_term()
functions.
Any ramdisk with /sbin/kbd present (amd64, cats, i386 at the moment)
will now present list of available keyboard encodings.
ok deraadt@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/alpha/common/install.md | 5 | ||||
-rw-r--r-- | distrib/amd64/common/install.md | 13 | ||||
-rw-r--r-- | distrib/cats/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/hp300/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/hppa/install.md | 5 | ||||
-rw-r--r-- | distrib/i386/common/install.md | 14 | ||||
-rw-r--r-- | distrib/luna88k/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/mac68k/ramdisk/install.md | 7 | ||||
-rw-r--r-- | distrib/macppc/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 12 | ||||
-rw-r--r-- | distrib/mvme68k/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/sgi/ramdisk/install.md | 6 | ||||
-rw-r--r-- | distrib/sparc/install.md | 5 | ||||
-rw-r--r-- | distrib/sparc64/common/install.md | 5 | ||||
-rw-r--r-- | distrib/vax/install.md | 5 | ||||
-rw-r--r-- | distrib/zaurus/ramdisk/install.md | 5 |
17 files changed, 24 insertions, 88 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md index e9574d74dfb..a75f23532db 100644 --- a/distrib/alpha/common/install.md +++ b/distrib/alpha/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2003/10/12 13:18:37 krw Exp $ +# $OpenBSD: install.md,v 1.19 2005/03/27 15:13:49 krw Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,9 +41,6 @@ MDXAPERTURE=1 ARCH=ARCH -md_set_term() { -} - md_installboot() { local _rawdev=/dev/r${1}c diff --git a/distrib/amd64/common/install.md b/distrib/amd64/common/install.md index 2e405505961..12fa4b96bbc 100644 --- a/distrib/amd64/common/install.md +++ b/distrib/amd64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.4 2005/03/26 19:27:11 krw Exp $ +# $OpenBSD: install.md,v 1.5 2005/03/27 15:13:49 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -45,17 +45,6 @@ MDXAPERTURE=2 MDSERIAL="com com tty0" ARCH=ARCH -md_set_term() { - local _tables="be br de dk es fr it jp no sf sg sv uk us" - - ask_yn "Are you using a USB keyboard?" - [[ $resp == n ]] && _tables="$_tables pt ru ua" - _tables=$(bsort $_tables) - - ask_which "kbd(8) table" "best matches your keyboard" "$_tables" us - [[ $resp != @(done|us) ]] && kbd $resp && echo $resp >/tmp/kbdtype -} - md_installboot() { echo Installing boot block... cp /usr/mdec/boot /mnt/boot diff --git a/distrib/cats/ramdisk/install.md b/distrib/cats/ramdisk/install.md index dd4cd4669fa..44ee7e7df7f 100644 --- a/distrib/cats/ramdisk/install.md +++ b/distrib/cats/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.8 2005/03/26 01:40:20 krw Exp $ +# $OpenBSD: install.md,v 1.9 2005/03/27 15:13:49 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,9 +43,6 @@ MDFSTYPE=msdos MDXAPERTURE=2 ARCH=ARCH -md_set_term() { -} - md_installboot() { } diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md index 27a56a2c1b6..7f9a9dede37 100644 --- a/distrib/hp300/ramdisk/install.md +++ b/distrib/hp300/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.38 2004/08/06 19:28:41 miod Exp $ +# $OpenBSD: install.md,v 1.39 2005/03/27 15:13:49 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. @@ -42,9 +42,6 @@ MDTERM=hp300h ARCH=ARCH -md_set_term() { -} - md_installboot() { # $1 is the root disk diff --git a/distrib/hppa/install.md b/distrib/hppa/install.md index cb636311bfc..346f6964340 100644 --- a/distrib/hppa/install.md +++ b/distrib/hppa/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.5 2004/08/19 02:03:09 mickey Exp $ +# $OpenBSD: install.md,v 1.6 2005/03/27 15:13:49 krw Exp $ # # machine dependent section of installation/upgrade script. # @@ -6,9 +6,6 @@ MDTERM=vt100 ARCH=ARCH -md_set_term() { -} - md_installboot() { echo -n "Installing boot block..." /sbin/disklabel -B $1 diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md index 34808a8a321..815a00fed5f 100644 --- a/distrib/i386/common/install.md +++ b/distrib/i386/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.26 2005/03/26 19:27:11 krw Exp $ +# $OpenBSD: install.md,v 1.27 2005/03/27 15:13:50 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,20 +43,8 @@ MDFSTYPE=msdos MDFSOPTS=-s MDXAPERTURE=2 MDSERIAL="pccom com tty0" - ARCH=ARCH -md_set_term() { - local _tables="be br de dk es fr it jp no sf sg sv uk us" - - ask_yn "Are you using a USB keyboard?" - [[ $resp == n ]] && _tables="$_tables pt ru ua" - _tables=$(bsort $_tables) - - ask_which "kbd(8) table" "best matches your keyboard" "$_tables" us - [[ $resp != @(done|us) ]] && kbd $resp && echo $resp >/tmp/kbdtype -} - md_installboot() { echo Installing boot block... # LBA biosboot uses /boot's i-node number. Using 'cat' preserves that diff --git a/distrib/luna88k/ramdisk/install.md b/distrib/luna88k/ramdisk/install.md index e218800f4ca..3a526c64051 100644 --- a/distrib/luna88k/ramdisk/install.md +++ b/distrib/luna88k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.2 2004/05/28 22:59:35 krw Exp $ +# $OpenBSD: install.md,v 1.3 2005/03/27 15:13:50 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -42,9 +42,6 @@ MDTERM=vt100 MDROOTFSOPT="-f 1024 -b 8192" ARCH=ARCH -md_set_term() { -} - md_installboot() { } diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md index 6318c32d0e2..c3cda69a082 100644 --- a/distrib/mac68k/ramdisk/install.md +++ b/distrib/mac68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.24 2004/12/10 20:18:34 miod Exp $ +# $OpenBSD: install.md,v 1.25 2005/03/27 15:13:50 krw Exp $ # # Copyright (c) 2002, Miodrag Vallat. # All rights reserved. @@ -67,12 +67,7 @@ MDSETS="bsdsbc bsdsbc.rd" MDTERM=vt100 ARCH=ARCH -md_set_term() { -} - md_installboot() { - # no standalone boot block - : } # $1 is the disk to check diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index aa0d9f5a1c7..04a918d0e07 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.27 2005/03/26 01:40:20 krw Exp $ +# $OpenBSD: install.md,v 1.28 2005/03/27 15:13:50 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,9 +43,6 @@ MDFSTYPE=msdos MDXAPERTURE=2 ARCH=ARCH -md_set_term() { -} - md_installboot() { local _disk=$1 diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index d3a7302cde2..4ac41b987a3 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.367 2005/03/26 15:40:21 krw Exp $ +# $OpenBSD: install.sub,v 1.368 2005/03/27 15:13:50 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2005 Todd Miller, Theo de Raadt, Ken Westerback @@ -67,7 +67,6 @@ # md_congrats() - display friendly message # md_installboot() - install boot-blocks on disk # md_prep_disklabel() - put an OpenBSD disklabel on the disk -# md_set_term() - set up terminal # # The following variables can be provided if required: # MDSETS - list of files to add to THESETS @@ -80,12 +79,17 @@ . install.md set_term() { + local _tables + [[ -n $TERM ]] && return ask "Terminal type?" ${MDTERM:-vt220} TERM=$resp export TERM - md_set_term + [[ -x /sbin/kbd ]] || return + _tables=$(bsort $(kbd -l | egrep -v "^(user|tables|encoding)")) + ask_which "kbd(8) table" "best matches your keyboard" "$_tables" us + [[ $resp != @(done|us) ]] && kbd $resp && echo $resp >/tmp/kbdtype } welcome() { @@ -104,7 +108,7 @@ your system in an inconsistent state. __EOT - # Configure the terminal. + # Configure the terminal and keyboard. set_term cat << __EOT diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md index 862931f2aee..455a16d4404 100644 --- a/distrib/mvme68k/ramdisk/install.md +++ b/distrib/mvme68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.27 2003/10/15 04:31:30 deraadt Exp $ +# $OpenBSD: install.md,v 1.28 2005/03/27 15:13:50 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -41,9 +41,6 @@ MDTERM=vt100 ARCH=ARCH -md_set_term() { -} - md_installboot() { echo "Installing boot block..." cp /mnt/usr/mdec/bootsd /mnt/boot diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md index f1151cfe64a..cbfc2a89e61 100644 --- a/distrib/mvme88k/ramdisk/install.md +++ b/distrib/mvme88k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.23 2003/10/15 04:32:28 deraadt Exp $ +# $OpenBSD: install.md,v 1.24 2005/03/27 15:13:50 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -41,9 +41,6 @@ MDTERM=vt100 ARCH=ARCH -md_set_term() { -} - md_installboot() { echo "Installing boot block..." cp /mnt/usr/mdec/bootsd /mnt/boot diff --git a/distrib/sgi/ramdisk/install.md b/distrib/sgi/ramdisk/install.md index 29a01c35044..5ea3023d76e 100644 --- a/distrib/sgi/ramdisk/install.md +++ b/distrib/sgi/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.3 2004/12/02 23:02:48 miod Exp $ +# $OpenBSD: install.md,v 1.4 2005/03/27 15:13:50 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,11 +43,7 @@ MDTERM=vt220 ARCH=ARCH -md_set_term() { -} - md_installboot() { -# Nothing to do. Boot is installed when preparing volume header. } md_checkfordisklabel() { diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md index c7b022c0547..8b44f5f72cb 100644 --- a/distrib/sparc/install.md +++ b/distrib/sparc/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.50 2003/10/12 13:18:37 krw Exp $ +# $OpenBSD: install.md,v 1.51 2005/03/27 15:13:50 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -44,9 +44,6 @@ MDTERM=sun MDDISKDEVS='/^sd[0-9] /s/ .*//p;/^x[dy][0-9] /s/ .*//p' ARCH=ARCH -md_set_term() { -} - md_installboot() { local _rawdev=/dev/r${1}c _prefix diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index 465dcdf8642..f0b37a55f2e 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2003/10/12 13:18:37 krw Exp $ +# $OpenBSD: install.md,v 1.19 2005/03/27 15:13:50 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -44,9 +44,6 @@ MDTERM=sun MDXAPERTURE=1 ARCH=ARCH -md_set_term() { -} - md_installboot() { local _rawdev=/dev/r${1}c _prefix diff --git a/distrib/vax/install.md b/distrib/vax/install.md index bae8d9d8ded..f57a177ad19 100644 --- a/distrib/vax/install.md +++ b/distrib/vax/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.22 2003/10/12 13:18:37 krw Exp $ +# $OpenBSD: install.md,v 1.23 2005/03/27 15:13:50 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -45,9 +45,6 @@ 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' ARCH=ARCH -md_set_term() { -} - md_installboot() { echo "Installing boot block..." cp /mnt/usr/mdec/boot /mnt/boot diff --git a/distrib/zaurus/ramdisk/install.md b/distrib/zaurus/ramdisk/install.md index a81b7698d3b..d121b2b1e9c 100644 --- a/distrib/zaurus/ramdisk/install.md +++ b/distrib/zaurus/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.2 2005/01/16 19:24:55 deraadt Exp $ +# $OpenBSD: install.md,v 1.3 2005/03/27 15:13:50 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,9 +43,6 @@ MDFSTYPE=msdos MDXAPERTURE=2 ARCH=ARCH -md_set_term() { -} - md_installboot() { } |