summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/alpha/ramdisk/install.md88
1 files changed, 41 insertions, 47 deletions
diff --git a/distrib/alpha/ramdisk/install.md b/distrib/alpha/ramdisk/install.md
index 5de6e756596..6e518d5dddf 100644
--- a/distrib/alpha/ramdisk/install.md
+++ b/distrib/alpha/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.28 1999/04/01 21:30:20 deraadt Exp $
+# $OpenBSD: install.md,v 1.29 1999/04/01 22:10:14 millert Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -43,7 +43,7 @@ TMPWRITEABLE=/tmp/writeable
KERNFSMOUNTED=/tmp/kernfsmounted
# Machine-dependent install sets
-MDSETS="kernel"
+MDSETS=kernel
md_machine_arch() {
cat /kern/machine
@@ -54,12 +54,10 @@ md_copy_kernel() {
}
md_set_term() {
- if [ ! -z "$TERM" ]; then
- return
- fi
+ test -n "$TERM" && return
echo -n "Specify terminal type [sun]: "
- getresp "sun"
- TERM="$resp"
+ getresp sun
+ TERM=$resp
export TERM
}
@@ -85,14 +83,14 @@ md_get_cddevs() {
md_get_partition_range() {
# return range of valid partition letters
- echo "[a-p]"
+ echo [a-p]
}
md_installboot() {
local _rawdev
- if [ "X${1}" = X"" ]; then
- echo "No disk device specified, you must run installboot manually."
+ if [ -z "$1" ]; then
+ echo No disk device specified, you must run installboot manually.
return
fi
_rawdev=/dev/r${1}c
@@ -105,7 +103,7 @@ md_installboot() {
cp /usr/mdec/boot /mnt/boot
/usr/mdec/installboot -v /mnt/boot /usr/mdec/bootxx $_rawdev
else
- echo "No boot block prototypes found, you must run installboot manually."
+ echo No boot block prototypes found, you must run installboot manually.
fi
}
@@ -128,30 +126,29 @@ md_checkfordisklabel() {
md_prep_disklabel()
{
- local _disk
+ local _disk=$1
- _disk=$1
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_1
+ cat << __EOT
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_1
+__EOT
disklabel -W ${_disk}
disklabel -f /tmp/fstab.${_disk} -E ${_disk}
@@ -159,17 +156,17 @@ __md_prep_disklabel_1
md_welcome_banner() {
{
- if [ "$MODE" = "install" ]; then
- echo "Welcome to the OpenBSD/alpha ${VERSION_MAJOR}.${VERSION_MINOR} installation program."
- cat << \__welcome_banner_1
+ if [ "$MODE" = install ]; then
+ cat << __EOT
+Welcome to the OpenBSD/alpha ${VERSION_MAJOR}.${VERSION_MINOR} installation program.
This program is designed to help you put OpenBSD on your system in a
simple and rational way.
-__welcome_banner_1
+__EOT
else
- echo "Welcome to the OpenBSD/alpha ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program."
- cat << \__welcome_banner_2
+ cat << __EOT
+Welcome to the OpenBSD/alpha ${VERSION_MAJOR}.${VERSION_MINOR} upgrade program.
This program is designed to help you upgrade your OpenBSD system in a
simple and rational way.
@@ -179,10 +176,10 @@ 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
@@ -193,55 +190,56 @@ can hit Control-C at any time to quit, but if you do so at a prompt,
you may have to hit return. Also, quitting in the middle of
installation may leave your system in an inconsistent state.
-__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() {
local what;
- if [ "$MODE" = "install" ]; then
- what="installed";
+ if [ "$MODE" = install ]; then
+ what=installed
else
- what="upgraded";
+ 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
}
md_native_fstype() {
+ :
}
md_native_fsopts() {
+ :
}
md_makerootwritable() {
# 2048 is the size in DEV_BIZE blocks
- if [ -e ${TMPWRITEABLE} ]
- then
+ if [ -e ${TMPWRITEABLE} ]; then
md_mountkernfs
return
fi
umount /tmp >> /dev/null 2>&1
if ! mount -t ffs -u /dev/rd0a / ; then
- cat << \__rd0_failed_1
+ cat << __EOT
FATAL ERROR: Can't mount the ram filesystem.
-__rd0_failed_1
+__EOT
exit
fi
@@ -252,24 +250,20 @@ __rd0_failed_1
md_mountkernfs
}
md_mountkernfs() {
- if [ -e ${KERNFSMOUNTED} ]
- then
- return
- fi
- if ! mount -t kernfs /kern /kern
- then
- cat << \__kernfs_failed_1
+ test -e $KERNFSMOUNTED && return
+ if ! mount -t kernfs /kern /kern; then
+ cat << __EOT
FATAL ERROR: Can't mount kernfs filesystem
-__kernfs_failed_1
+__EOT
exit
fi
- > ${KERNFSMOUNTED}
+ > $KERNFSMOUNTED
}
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
}