summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-12 02:15:32 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-12 02:15:32 +0000
commit54c7f5fa4b2c050c600ceda94ee5d9510e4bdcaf (patch)
treec4aadd563fcbe867611f50e262a9db233915d751
parent1c02e8a064f0ddb830dc6339d9e76911c343fee4 (diff)
kbd setting code for the installer. smat@acm.org, miod, and krw. Minimal
last minute tweaks to it by me, but you can trust me, right?
-rw-r--r--distrib/i386/floppies/common/crunch.conf4
-rw-r--r--distrib/i386/floppies/common/install.md55
-rw-r--r--distrib/i386/floppies/common/list3
-rw-r--r--distrib/special/Makefile4
-rw-r--r--distrib/special/kbd/Makefile23
5 files changed, 83 insertions, 6 deletions
diff --git a/distrib/i386/floppies/common/crunch.conf b/distrib/i386/floppies/common/crunch.conf
index d0b63c52338..e811956b675 100644
--- a/distrib/i386/floppies/common/crunch.conf
+++ b/distrib/i386/floppies/common/crunch.conf
@@ -1,4 +1,4 @@
-# $OpenBSD: crunch.conf,v 1.1 2002/03/30 20:35:31 millert Exp $
+# $OpenBSD: crunch.conf,v 1.2 2002/04/12 02:15:28 deraadt Exp $
#
# instbin.conf - unified binary for the inst/upgr floppies
#
@@ -11,7 +11,7 @@ progs fsck_ffs ftp fdisk hostname
progs ifconfig init less ln ls mkdir mknod mount mount_cd9660
progs mount_ffs mount_msdos mount_ext2fs
progs mv newfs pax ksh ping reboot rm route
-progs sed sleep stty umount
+progs sed sleep stty umount kbd
progs rsh restore gzip grep installboot
ln chmod chgrp
diff --git a/distrib/i386/floppies/common/install.md b/distrib/i386/floppies/common/install.md
index dbaeaf05eb1..6178fb42cb4 100644
--- a/distrib/i386/floppies/common/install.md
+++ b/distrib/i386/floppies/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.16 2002/03/31 17:30:30 deraadt Exp $
+# $OpenBSD: install.md,v 1.17 2002/04/12 02:15:28 deraadt Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -44,11 +44,64 @@ MDSETS=kernel
ARCH=ARCH
md_set_term() {
+ local _tables
+
test -n "$TERM" && return
echo -n "Specify terminal type [vt220]: "
getresp vt220
TERM=$resp
export TERM
+
+ echo -n "Do you wish to select a keyboard encoding table? [n] "
+ getresp n
+
+ case $resp in
+ Y*|y*) ;;
+ *) return
+ ;;
+ esac
+
+ resp=
+ while : ; do
+ echo -n "Select your keyboard type: (P)C-AT/XT, (U)SB or 'done' [P] "
+ getresp P
+ case $resp in
+ P*|p*) _tables="be de dk es fr it jp lt no pt ru sf sg sv ua uk us"
+ ;;
+ U*|u*) _tables="de dk es fr it jp no sf sg sv uk us"
+ ;;
+ done) ;;
+ *) echo "'$resp' is not a valid keyboard type."
+ resp=
+ continue
+ ;;
+ esac
+ break;
+ done
+
+ [ -z "$_tables" ] && return
+
+ while : ; do
+ cat << __EOT
+The available keyboard encoding tables are:
+
+ ${_tables}
+
+__EOT
+ echo -n "Table name? (or 'done') [us] "
+ getresp us
+ case $resp in
+ done) ;;
+ *) if kbd $resp ; then
+ echo $resp > /tmp/kbdtype
+ else
+ echo "'${resp}' is not a valid table name."
+ continue
+ fi
+ ;;
+ esac
+ break;
+ done
}
md_get_diskdevs() {
diff --git a/distrib/i386/floppies/common/list b/distrib/i386/floppies/common/list
index ad1620b371b..28c095ef580 100644
--- a/distrib/i386/floppies/common/list
+++ b/distrib/i386/floppies/common/list
@@ -1,4 +1,4 @@
-# $OpenBSD: list,v 1.24 2002/04/10 03:54:46 deraadt Exp $
+# $OpenBSD: list,v 1.25 2002/04/12 02:15:28 deraadt Exp $
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/instbin instbin
@@ -41,6 +41,7 @@ LINK instbin sbin/route
#LINK instbin sbin/scsi
#LINK instbin sbin/swapon
LINK instbin sbin/umount
+LINK instbin sbin/kbd
LINK instbin usr/bin/egrep usr/bin/fgrep usr/bin/grep
LINK instbin usr/bin/ftp
LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
diff --git a/distrib/special/Makefile b/distrib/special/Makefile
index 48a5b5ade20..3a8e34a1074 100644
--- a/distrib/special/Makefile
+++ b/distrib/special/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.6 2002/02/08 20:12:37 deraadt Exp $
+# $OpenBSD: Makefile,v 1.7 2002/04/12 02:15:30 deraadt Exp $
-SUBDIR= ftp pppd rsh dhclient init dmesg grep
+SUBDIR= ftp pppd rsh dhclient init dmesg grep kbd
.include <bsd.subdir.mk>
diff --git a/distrib/special/kbd/Makefile b/distrib/special/kbd/Makefile
new file mode 100644
index 00000000000..03dfb81bc73
--- /dev/null
+++ b/distrib/special/kbd/Makefile
@@ -0,0 +1,23 @@
+# $OpenBSD: Makefile,v 1.1 2002/04/12 02:15:31 deraadt Exp $
+
+PROG= kbd
+MAN=
+COPTS+= -Os
+CFLAGS+=-DNOKVM -I${.CURDIR}/../../../sbin/kbd
+.PATH: ${.CURDIR}/../../../sbin/kbd
+
+SRCS= main.c
+
+.if (${MACHINE} == "arc")
+SRCS+= kbd_i386.c
+.elif (${MACHINE} == "i386") || (${MACHINE} == "macppc") || \
+ (${MACHINE} == "vax") || (${MACHINE} == "alpha") || \
+ (${MACHINE} == "sparc64")
+SRCS+= kbd_wscons.c
+.elif (${MACHINE} == "sparc")
+SRCS+= kbd_sparc.c
+.else
+SRCS+= kbd_void.c
+.endif
+
+.include <bsd.prog.mk>