summaryrefslogtreecommitdiff
path: root/distrib/i386
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-04-01 21:57:10 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-04-01 21:57:10 +0000
commit2bf69db10f0e7ae1f9d05096558b30239b1f1370 (patch)
treee296e76c87d4943d053f3e44e54147db649c561e /distrib/i386
parent31889d1502e1ff44c71c495cf20c8c9a6be32858 (diff)
shave a few bytes
Diffstat (limited to 'distrib/i386')
-rw-r--r--distrib/i386/floppies/ramdisk/install.md84
1 files changed, 38 insertions, 46 deletions
diff --git a/distrib/i386/floppies/ramdisk/install.md b/distrib/i386/floppies/ramdisk/install.md
index 116e8c0a659..7fd851608b9 100644
--- a/distrib/i386/floppies/ramdisk/install.md
+++ b/distrib/i386/floppies/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.44 1999/04/01 21:28:11 deraadt Exp $
+# $OpenBSD: install.md,v 1.45 1999/04/01 21:57:09 millert Exp $
#
#
# Copyright rc) 1996 The NetBSD Foundation, Inc.
@@ -44,16 +44,15 @@
MDSETS="kernel"
md_set_term() {
- if [ ! -z "$TERM" ]; then
- return
- fi
+ test -n "$TERM" && return
echo -n "Specify terminal type [pcvt25]: "
- getresp "pcvt25"
- TERM="$resp"
+ getresp pcvt25
+ TERM=$resp
export TERM
}
md_makerootwritable() {
+ :
}
md_machine_arch() {
@@ -72,17 +71,17 @@ md_get_cddevs() {
md_get_partition_range() {
# return range of valid partition letters
- echo "[a-p]"
+ echo [a-p]
}
md_installboot() {
- echo "Installing boot block..."
+ echo Installing boot block...
cp /usr/mdec/boot /mnt/boot
/usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot ${1}
echo
echo -n "Do you expect to run the X Window System on this machine? [y or n] "
- getresp "n"
+ getresp n
case "$resp" in
y*|Y*)
echo "Enabling machdep.allowaperture. Read xf86(4) for more information."
@@ -98,11 +97,11 @@ q' | ed /mnt/etc/sysctl.conf 2> /dev/null
}
md_native_fstype() {
- echo "msdos"
+ echo msdos
}
md_native_fsopts() {
- echo "ro"
+ echo ro
}
md_checkfordisklabel() {
@@ -124,26 +123,22 @@ md_checkfordisklabel() {
md_prep_fdisk()
{
- local _disk
- local _whole
-
- _disk=$1
- _whole=$2
+ local _disk=$1 _whole=$2
if [ -n "$_whole" ]; then
echo
- echo 'Updating MBR based on BIOS geometry.'
- fdisk -e ${_disk} << \__md_prep_fdisk_0
+ echo Updating MBR based on BIOS geometry.
+ fdisk -e ${_disk} << __EOC
reinit
update
write
quit
-__md_prep_fdisk_0
+__EOC
else
echo
- cat << \__md_prep_fdisk_1
+ cat << __EOT
A single OpenBSD partition with id 'A6' ('OpenBSD') should exist in the MBR.
All of your OpenBSD partitions will be contained _within_ this partition,
including your swap space. In the normal case it should be the only partition
@@ -153,13 +148,13 @@ other. [If this is a new install, you are most likely going to want to type
the following fdisk commands: reinit, update, write, quit. Use the 'manual'
command to read a full description.] The current partition information is:
-__md_prep_fdisk_1
+__EOT
fdisk ${_disk}
echo
fdisk -e ${_disk}
fi
- echo "Here is the partition information you chose:"
+ echo Here is the partition information you chose:
echo
fdisk ${_disk}
echo
@@ -167,10 +162,7 @@ __md_prep_fdisk_1
md_prep_disklabel()
{
- local _disk
- local _flags
-
- _disk=$1
+ local _disk=$1 _flags
echo -n 'Do you want to use the *entire* disk for OpenBSD? [no] '
getresp "no"
@@ -179,7 +171,7 @@ md_prep_disklabel()
esac
md_prep_fdisk ${_disk} ${_flags}
- cat << \__md_prep_disklabel_1
+ cat << __EOT
Inside the BIOS 'A6' ('OpenBSD') partition you just created, there resides an
OpenBSD partition table which defines how this BIOS partition is to be split
@@ -188,24 +180,24 @@ space, and any other partitions you might create. (NOTE: The OpenBSD disk
label offsets are absolute, ie. relative to the start of the disk... NOT
relative to the start of the BIOS 'A6' partition).
-__md_prep_disklabel_1
+__EOT
md_checkfordisklabel $_disk
case $? in
0)
;;
1)
- echo "WARNING: Disk $_disk has no label. You will be creating a new one."
+ echo WARNING: Disk $_disk has no label. You will be creating a new one.
echo
;;
2)
- echo "WARNING: Label on disk $_disk is corrupted. You will be repairing."
+ echo WARNING: Label on disk $_disk is corrupted. You will be repairing.
echo
;;
esac
# display example
- cat << \__md_prep_disklabel_2
+ cat << __EOT
If this disk is shared with other operating systems, those operating systems
should have a BIOS partition entry that spans the space they occupy completely.
For safety, also make sure all OpenBSD file systems are within the offset and
@@ -214,7 +206,7 @@ editor will try to enforce this). If you are unsure of how to use multiple
partitions properly (ie. separating /, /usr, /tmp, /var, /usr/local, and other
things) just split the space into a root and swap partition for now.
-__md_prep_disklabel_2
+__EOT
disklabel ${_flags} -f /tmp/fstab.${_disk} -E ${_disk}
}
@@ -225,27 +217,27 @@ md_copy_kernel() {
md_welcome_banner() {
{
if [ "$MODE" = "install" ]; then
- echo "Welcome to the OpenBSD/i386 ${VERSION_MAJOR}.${VERSION_MINOR} installation program."
- cat << \__welcome_banner_1
+ echo Welcome to the OpenBSD/i386 ${VERSION_MAJOR}.${VERSION_MINOR} installation program.
+ cat << __EOT
This program is designed to help you put OpenBSD on your disk in a simple and
rational way.
-__welcome_banner_1
+__EOT
else
- echo ""
- echo "Welcome to the OpenBSD/i386 ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program."
- cat << \__welcome_banner_2
+ echo
+ echo Welcome to the OpenBSD/i386 ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program.
+ cat << __EOT
This program is designed to help you upgrade your OpenBSD system in a simple
and rational way. As a reminder, installing the `etc' binary set is NOT
recommended. Once the rest of your system has been upgraded, you should
manually merge any changes to files in the `etc' set into those files which
already exist on your system.
-__welcome_banner_2
+__EOT
fi
-cat << \__welcome_banner_3
+cat << __EOT
As with anything which modifies your disk's contents, this program can cause
SIGNIFICANT data loss, and you are advised to make sure your data is backed
@@ -257,17 +249,17 @@ to hit return. Also, quitting in the middle of installation may leave your
system in an inconsistent state. If you hit Control-C and restart the
install, the install program will remember many of your old answers.
-__welcome_banner_3
+__EOT
} | more
}
md_not_going_to_install() {
- cat << \__not_going_to_install_1
+ cat << __EOT
OK, then. Enter `halt' at the prompt to halt the machine. Once the machine
has halted, power-cycle the system to load new boot code.
-__not_going_to_install_1
+__EOT
}
md_congrats() {
@@ -277,19 +269,19 @@ md_congrats() {
else
what="upgraded";
fi
- cat << __congratulations_1
+ cat << __EOT
CONGRATULATIONS! You have successfully $what OpenBSD! To boot the
installed system, enter halt at the command prompt. Once the system has
halted, reset the machine and boot from the disk.
-__congratulations_1
+__EOT
}
hostname() {
case $# in
0) cat /kern/hostname ;;
1) echo "$1" > /kern/hostname ;;
- *) echo "usage: hostname [name-of-host]"
+ *) echo usage: hostname [name-of-host]
esac
}