diff options
Diffstat (limited to 'distrib/macppc/ramdisk/install.md')
-rw-r--r-- | distrib/macppc/ramdisk/install.md | 76 |
1 files changed, 29 insertions, 47 deletions
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index 34a0e70e8a3..3ab5237ca97 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.6 2002/02/23 18:29:51 deraadt Exp $ +# $OpenBSD: install.md,v 1.7 2002/03/31 17:30:30 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -35,13 +35,12 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # - # # machine dependent section of installation/upgrade script. # # Machine-dependent install sets -MDSETS="kernel" +MDSETS=kernel ARCH=ARCH md_set_term() { @@ -63,8 +62,8 @@ md_get_cddevs() { } md_get_partition_range() { - # return range of valid partition letters - echo [a-p] + # return range of valid partition letters + echo [a-p] } md_questions() { @@ -72,21 +71,19 @@ md_questions() { echo -n "Do you expect to run the X Window System? [y] " getresp y case "$resp" in - y*|Y*) - xfree86=y - ;; - *) - ;; + y*|Y*) + xfree86=y + ;; esac echo } md_installboot() { - if [[ $disklabeltype = "HFS" ]] + if [[ $disklabeltype = "HFS" ]] then echo "the 'ofwboot' program needs to be copied to the first HFS partition" echo "of the disk to allow booting of OpenBSD" - elif [[ $disklabeltype = "MBR" ]] + elif [[ $disklabeltype = "MBR" ]] then echo "Installing boot in the msdos partition /dev/${1}i" if mount -t msdos /dev/${1}i /mnt2 ; then @@ -107,11 +104,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_init_mbr() { @@ -131,10 +128,8 @@ md_init_mbr() { echo -n "Do you want to init the MBR and the MSDOS partition? [y] " getresp "y" case "$resp" in - n*|N*) - exit 0;; - *) - echo + n*|N*) exit 0;; + *) echo echo "An MBR record with an OpenBSD usable partition table will now be copied" echo "to your disk. Unless you have special requirements you will not need" echo "to edit this MBR. After the MBR is copied an empty 1MB MSDOS partition" @@ -147,7 +142,7 @@ md_init_mbr() { echo "This will take a minute or two..." sleep 2 echo -n "Creating Master Boot Record (MBR)..." - fdisk -i -f /usr/mdec/mbr $1 + fdisk -i -f /usr/mdec/mbr $1 echo "..done." echo -n "Copying 1MB MSDOS partition to disk..." gunzip < /usr/mdec/msdos1mb.gz | dd of=/dev/r$1c bs=512 seek=1 >/dev/null 2>&1 @@ -180,13 +175,11 @@ md_checkfordisklabel() { echo -n "Do you want to choose (H)FS labeling or (M)BR labeling [H] " getresp "h" case "$resp" in - m*|M*) - export disklabeltype=MBR + m*|M*) export disklabeltype=MBR md_checkforMBRdisklabel $1 rval=$? ;; - *) - export disklabeltype=HFS + *) export disklabeltype=HFS md_init_hfs $1 rval=$? ;; @@ -199,20 +192,15 @@ md_checkforMBRdisklabel() { echo -n "Is this correct? [n] " getresp "n" case "$resp" in - n*|N*) - echo "aborting install" + n*|N*) echo "aborting install" exit 0;; - *) - ;; esac echo -n "Have you initialized an MSDOS partition using OpenFirmware? [n] " getresp "n" case "$resp" in - n*|N*) - md_init_mbr $1;; - *) - echo + n*|N*) md_init_mbr $1;; + *) echo echo "You may keep your current setup if you want to be able to use any" echo "already loaded OS. However you will be asked to prepare an empty" echo "partition for OpenBSD later. There must also be at least ~0.5MB free space" @@ -224,10 +212,7 @@ md_checkforMBRdisklabel() { echo -n "Do you want to keep the current MSDOS partition setup? [y]" getresp "y" case "$resp" in - n*|N*) - md_init_mbr $1;; - *) - ;; + n*|N*) md_init_mbr $1;; esac ;; esac @@ -305,8 +290,8 @@ __md_prep_fdisk_1 getresp "n" case "$resp" in - n*|N*) ;; - *) _done=1 ;; + n*|N*) ;; + *) _done=1 ;; esac done @@ -327,16 +312,13 @@ md_prep_disklabel() _disk=$1 md_checkfordisklabel $_disk case $? in - 0) - echo -n "Do you wish to edit the disklabel on $_disk? [y] " + 0) echo -n "Do you wish to edit the disklabel on $_disk? [y] " ;; - 1) - md_prep_fdisk ${_disk} + 1) md_prep_fdisk ${_disk} echo "WARNING: Disk $_disk has no label" echo -n "Do you want to create one with the disklabel editor? [y] " ;; - 2) - echo "WARNING: Label on disk $_disk is corrupted" + 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] " ;; @@ -344,7 +326,7 @@ md_prep_disklabel() getresp "y" case "$resp" in - y*|Y*) ;; + y*|Y*) ;; *) return ;; esac @@ -352,7 +334,7 @@ md_prep_disklabel() cat << \__md_prep_disklabel_1 Disk partition sizes and offsets are in sector (most likely 512 bytes) units. -You may set these size/offset pairs on cylinder boundaries +You may set these size/offset pairs on cylinder boundaries (the number of sector per cylinder is given in ) (the `sectors/cylinder' entry, which is not shown here) Also, you *must* make sure that the 'i' partition points at the MSDOS @@ -377,10 +359,10 @@ Do not change any parameters except the partition layout and the label name. __md_prep_disklabel_1 echo -n "Press [Enter] to continue " getresp "" - if [[ $disklabeltype = "HFS" ]] + if [[ $disklabeltype = "HFS" ]] then disklabel -c -f /tmp/fstab.${_disk} -E ${_disk} - elif [[ $disklabeltype = "MBR" ]] + elif [[ $disklabeltype = "MBR" ]] then disklabel -W ${_disk} disklabel ${_disk} >/tmp/label.$$ |