diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-02 01:08:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-02 01:08:17 +0000 |
commit | 1b435f13d47e4d698fc96800a550fc5508509a18 (patch) | |
tree | 0cab1747c3968e4a33e132b4c568bd2e6ef3376b /distrib/sparc | |
parent | cb06ba068d2e33238b4fa3af52d3afa01fc7411c (diff) |
shave a few bytes
Diffstat (limited to 'distrib/sparc')
-rw-r--r-- | distrib/sparc/install.md | 73 |
1 files changed, 35 insertions, 38 deletions
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md index 9ce45b127bc..0bf2cb90333 100644 --- a/distrib/sparc/install.md +++ b/distrib/sparc/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.25 1999/04/01 21:30:51 deraadt Exp $ +# $OpenBSD: install.md,v 1.26 1999/04/02 01:08:16 millert Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -63,12 +63,10 @@ hostname() { } 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 } @@ -80,11 +78,11 @@ md_makerootwritable() { if [ ! -w /tmp ]; then umount /tmp > /dev/null 2>&1 if ! mount_mfs -s 2048 swap /tmp ; then - cat << \__mfs_failed_1 + cat << __EOT FATAL ERROR: Can't mount the memory filesystem. -__mfs_failed_1 +__EOT exit fi @@ -124,15 +122,14 @@ md_get_cddevs() { md_get_partition_range() { # return range of valid partition letters - echo "[a-p]" + echo [a-p] } md_installboot() { - local _rawdev - local _prefix + local _rawdev _prefix - 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 @@ -143,20 +140,22 @@ md_installboot() { elif [ -e /usr/mdec/boot ]; then _prefix=/usr/mdec else - echo "No boot block prototypes found, you must run installboot manually." + echo No boot block prototypes found, you must run installboot manually. return fi - echo "Installing boot block..." + echo Installing boot block... cp ${_prefix}/boot /mnt/boot sync; sync; sync installboot -v /mnt/boot ${_prefix}/bootxx ${_rawdev} } md_native_fstype() { + : } md_native_fsopts() { + : } md_checkfordisklabel() { @@ -178,30 +177,29 @@ md_checkfordisklabel() { md_prep_disklabel() { - local _disk + local _disk=$1 - _disk=$1 md_checkfordisklabel $_disk case $? in 0) ;; 1) - echo "WARNING: Label on disk $_disk has no label. You will be creating a new one." + echo WARNING: Label on 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} } @@ -212,19 +210,18 @@ md_copy_kernel() { md_welcome_banner() { { - if [ "$MODE" = "install" ]; then - echo "Welcome to the OpenBSD/sparc ${VERSION_MAJOR}.${VERSION_MINOR} installation program." - cat << \__welcome_banner_1 + if [ "$MODE" = install ]; then + cat << __EOT +Welcome to the OpenBSD/sparc ${VERSION_MAJOR}.${VERSION_MINOR} installation program. 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/sparc ${VERSION} upgrade program." - cat << \__welcome_banner_2 + cat << __EOT +echo Welcome to the OpenBSD/sparc ${VERSION} upgrade program. This program is designed to help you upgrade your OpenBSD system in a simple and rational way. @@ -234,10 +231,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 @@ -248,31 +245,31 @@ 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 } |