diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-05-14 01:49:26 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-05-14 01:49:26 +0000 |
commit | db7cc88a2550fc7bbbe898dd12b18a979e9bd488 (patch) | |
tree | 5cfc1dc61d9d921bf1c5580d9782013175bd3a73 | |
parent | 630b643d7c68abdb3559d346ae234ff3495bb407 (diff) |
Eliminate md_native_fstype() and md_native_fsopts(). Both functions
simply echo'd a single word if present at all.
Replace with variables MDFSTYPE and MDFSOPTS if required. Rework logic
in install.sub's mount_a_disk() to always include 'ro' as an option to
the mount command. This allows even those arch's with MDFSTYPE to
usually get by without MDFSOPTS.
ok deraadt@
-rw-r--r-- | distrib/alpha/common/install.md | 9 | ||||
-rw-r--r-- | distrib/amiga/install.md | 11 | ||||
-rw-r--r-- | distrib/hp300/ramdisk/install.md | 10 | ||||
-rw-r--r-- | distrib/i386/common/install.md | 12 | ||||
-rw-r--r-- | distrib/mac68k/ramdisk/install.md | 10 | ||||
-rw-r--r-- | distrib/macppc/ramdisk/install.md | 11 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 35 | ||||
-rw-r--r-- | distrib/mvme68k/ramdisk/install.md | 10 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/install.md | 5 | ||||
-rw-r--r-- | distrib/mvmeppc/ramdisk/install.md | 11 | ||||
-rw-r--r-- | distrib/sparc/install.md | 10 | ||||
-rw-r--r-- | distrib/sparc64/common/install.md | 10 | ||||
-rw-r--r-- | distrib/sun3/install.md | 10 | ||||
-rw-r--r-- | distrib/vax/install.md | 10 |
14 files changed, 31 insertions, 133 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md index 2383e7fa069..bc71a69b73a 100644 --- a/distrib/alpha/common/install.md +++ b/distrib/alpha/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.7 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.8 2002/05/14 01:49:25 krw Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -138,10 +138,3 @@ __EOT md_congrats() { } - -md_native_fstype() { - : -} -md_native_fsopts() { - : -} diff --git a/distrib/amiga/install.md b/distrib/amiga/install.md index f20209ccb9a..daf431f914f 100644 --- a/distrib/amiga/install.md +++ b/distrib/amiga/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.16 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.17 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -42,6 +42,7 @@ # Machine-dependent install sets MDSETS=kernel +MDFSTYPE=ados ARCH=ARCH md_set_term() { @@ -65,14 +66,6 @@ md_installboot() { # Nothing needed } -md_native_fstype() { - echo "ados" -} - -md_native_fsopts() { - echo "ro" -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md index 621d7322240..e9325ef7627 100644 --- a/distrib/hp300/ramdisk/install.md +++ b/distrib/hp300/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.29 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.30 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -118,11 +118,3 @@ __EOT md_congrats() { } - -md_native_fstype() { - # Nothing to do. -} - -md_native_fsopts() { - # Nothing to do. -} diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md index 0041b105d6b..8c71235a867 100644 --- a/distrib/i386/common/install.md +++ b/distrib/i386/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.4 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.5 2002/05/14 01:49:25 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -41,6 +41,8 @@ # Machine-dependent install sets MDSETS=kernel +MDFSTYPE=msdos +MDFSOPTS=-l ARCH=ARCH md_set_term() { @@ -131,14 +133,6 @@ q' | ed /mnt/etc/sysctl.conf 2> /dev/null fi } -md_native_fstype() { - echo msdos -} - -md_native_fsopts() { - echo "ro,-l" -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md index d82e0b12bf3..0fa3cd1617d 100644 --- a/distrib/mac68k/ramdisk/install.md +++ b/distrib/mac68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.11 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.12 2002/05/14 01:49:25 krw Exp $ # # Copyright (c) 2002, Miodrag Vallat. # All rights reserved. @@ -89,14 +89,6 @@ md_installboot() { : } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index 3db7ddc15a6..c7f58de0eca 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.11 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.12 2002/05/14 01:49:25 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -41,6 +41,7 @@ # Machine-dependent install sets MDSETS=kernel +MDFSTYPE=msdos ARCH=ARCH md_set_term() { @@ -92,14 +93,6 @@ q' | ed /mnt/etc/sysctl.conf 2> /dev/null fi } -md_native_fstype() { - echo "msdos" -} - -md_native_fsopts() { - echo "ro" -} - md_init_mbr() { # $1 is the disk to init echo diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index ebc6e98a84a..0362bf6a646 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.220 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.sub,v 1.221 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -74,13 +74,13 @@ # md_get_cddevs() - return available CD-ROM devices # md_get_diskdevs() - return available disk devices # md_installboot() - install boot-blocks on disk -# md_native_fsopts() - native filesystem options for disk installs -# md_native_fstype() - native filesystem type for disk installs # md_prep_disklabel() - label the root disk # md_set_term() - set up terminal # # The following variables can be provided if required: -# MDTERM - 'vt220' assumed if not provided +# MDTERM - 'vt220' assumed if not provided +# MDFSTYPE - nothing assumed if not provided +# MDFSOPTS - nothing assumed if not provided . install.md set_term() { @@ -1398,8 +1398,8 @@ mount_a_disk() { # is $_DKDEVS. # returns 0 on failure. - local _drive _def_partition _partition_range _partition _fstype - local _fsopts _md_fstype _md_fsopts + local _drive _def_partition _partition_range _partition + local _fstype _fsopts cat << __EOT @@ -1471,30 +1471,21 @@ __EOT The following filesystem types are supported: default (deduced from the disklabel) ffs +$MDFSTYPE __EOT - _md_fstype=`md_native_fstype` - _md_fsopts=`md_native_fsopts` - if [ "$_md_fstype" ]; then - echo " $_md_fstype" - else - _md_fstype=_undefined_ - fi - resp= while [ -z "$resp" ]; do ask "Which filesystem type?" default case $resp in default) - _fstype= - _fsopts=ro ;; - ffs) _fstype="-t $resp" - _fsopts=async,ro + ffs) _fstype="-t ffs" + _fsopts=async ;; - $_md_fstype) + $MDFSTYPE) _fstype="-t $resp" - _fsopts=$_md_fsopts + _fsopts=$MDFSOPTS ;; *) echo "Invalid response: $resp" # force loop to repeat @@ -1503,8 +1494,8 @@ __EOT esac done - # Mount the disk - if ! mount $_fstype -o $_fsopts /dev/${_drive}${_partition} /mnt2; then + # Mount the disk read-only + if ! mount $_fstype -o ro,$_fsopts /dev/${_drive}${_partition} /mnt2; then echo "Cannot mount disk. Aborting." return 0 fi diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md index 5b6081ad8b2..d3000cee4f4 100644 --- a/distrib/mvme68k/ramdisk/install.md +++ b/distrib/mvme68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.19 2002/05/14 01:49:25 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -66,14 +66,6 @@ md_installboot() { /mnt/usr/mdec/installboot -v /mnt/bootsd /mnt/usr/mdec/bootxx /dev/r${1}a } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md index 119fa964873..64c39350673 100644 --- a/distrib/mvme88k/ramdisk/install.md +++ b/distrib/mvme88k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.13 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.14 2002/05/14 01:49:25 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -157,6 +157,3 @@ __EOT md_congrats() { } - -md_native_fstype() { -} diff --git a/distrib/mvmeppc/ramdisk/install.md b/distrib/mvmeppc/ramdisk/install.md index 44ae33ec59f..fdd14937f74 100644 --- a/distrib/mvmeppc/ramdisk/install.md +++ b/distrib/mvmeppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.10 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.11 2002/05/14 01:49:25 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -42,6 +42,7 @@ # Machine-dependent install sets MDSETS=kernel MDTERM=vt100 +MDFSTYPE=msdos ARCH=ARCH md_set_term() { @@ -78,14 +79,6 @@ md_installboot() { fi } -md_native_fstype() { - echo "msdos" -} - -md_native_fsopts() { - echo "ro" -} - md_init_mbr() { # $1 is the disk to init echo diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md index 1d744da0a57..19f00ddf229 100644 --- a/distrib/sparc/install.md +++ b/distrib/sparc/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.40 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.41 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -101,14 +101,6 @@ md_installboot() { installboot -v /mnt/boot ${_prefix}/bootxx ${_rawdev} } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index e9ff7ae3fc4..99243bd2b0e 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.9 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.10 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -124,14 +124,6 @@ q' | ed /mnt/etc/sysctl.conf 2> /dev/null fi } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/sun3/install.md b/distrib/sun3/install.md index 2e378bce20a..2ef489c8156 100644 --- a/distrib/sun3/install.md +++ b/distrib/sun3/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.8 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.9 2002/05/14 01:49:25 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -100,14 +100,6 @@ md_installboot() { installboot -v /mnt/boot ${_prefix}/bootxx ${_rawdev} } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval diff --git a/distrib/vax/install.md b/distrib/vax/install.md index eaa0a8acb5d..52200391b73 100644 --- a/distrib/vax/install.md +++ b/distrib/vax/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.13 2002/05/09 21:54:46 krw Exp $ +# $OpenBSD: install.md,v 1.14 2002/05/14 01:49:25 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -83,14 +83,6 @@ md_installboot() { /sbin/disklabel -B $1 } -md_native_fstype() { - : -} - -md_native_fsopts() { - : -} - md_checkfordisklabel() { # $1 is the disk to check local rval |