summaryrefslogtreecommitdiff
path: root/distrib/mvme68k/ramdisk/install.md
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-04-28 14:44:02 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-04-28 14:44:02 +0000
commitf011e18a2c4c8d782605da6be8567531730cca40 (patch)
tree4503d6d69f6d44f4daf7d48703f0813f3d9912b0 /distrib/mvme68k/ramdisk/install.md
parent2f15e29fadc2bc35285820205ae7ff94f2d19be8 (diff)
Change getresp() into ask().
ask() takes 2 parameters. The first one is the question to ask the user, and the 2nd is the default answer. Shrinks and makes the code clearer. From espie@ with some tweaking, ok deraadt@.
Diffstat (limited to 'distrib/mvme68k/ramdisk/install.md')
-rw-r--r--distrib/mvme68k/ramdisk/install.md15
1 files changed, 6 insertions, 9 deletions
diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md
index aca9e34008e..04ee75708f0 100644
--- a/distrib/mvme68k/ramdisk/install.md
+++ b/distrib/mvme68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.15 2002/04/25 21:28:13 miod Exp $
+# $OpenBSD: install.md,v 1.16 2002/04/28 14:44:01 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -46,8 +46,7 @@ md_set_term() {
if [ ! -z "$TERM" ]; then
return
fi
- echo -n "Specify terminal type [vt100]: "
- getresp "vt100"
+ ask "Specify terminal type:" vt100
TERM="$resp"
export TERM
}
@@ -109,17 +108,16 @@ md_prep_disklabel()
_disk=$1
md_checkfordisklabel $_disk
case $? in
- 0) echo -n "Do you wish to edit the disklabel on $_disk? [y] "
+ 0) ask "Do you wish to edit the disklabel on $_disk?" y
;;
1) echo "WARNING: Disk $_disk has no label"
- echo -n "Do you want to create one with the disklabel editor? [y] "
+ ask "Do you want to create one with the disklabel editor?" y
;;
2) echo "WARNING: Label on disk $_disk is corrupted"
- echo -n "Do you want to try and repair the damage using the disklabel editor? [y] "
+ ask "Do you want to try and repair the damage using the disklabel editor?" y
;;
esac
- getresp "y"
case "$resp" in
y*|Y*) ;;
*) return ;;
@@ -148,8 +146,7 @@ in case you have defined less than sixteen partitions.
[End of example]
__EOT
- echo -n "Press [Enter] to continue "
- getresp ""
+ ask "Press [Enter] to continue"
disklabel -W ${_disk}
disklabel -f /tmp/fstab.${_disk} -E ${_disk}
}