summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-03-23 15:51:36 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-03-23 15:51:36 +0000
commit9e95a4dd7a4a29af2d5d1c32a8192d1f8bc8e93e (patch)
tree8ce1041d24fb631978fff71917e9206c0a4160aa
parentb2e61571095e15787d56c879da7034b2235daf07 (diff)
Bring mac68k into the md_checkfordisklabel()-free world.
Quick test by martin@ shows it seems to still work.
-rw-r--r--distrib/mac68k/ramdisk/install.md30
1 files changed, 6 insertions, 24 deletions
diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md
index 2deb03bc95d..20acd9a6d8f 100644
--- a/distrib/mac68k/ramdisk/install.md
+++ b/distrib/mac68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.27 2008/03/04 00:36:38 krw Exp $
+# $OpenBSD: install.md,v 1.28 2008/03/23 15:51:35 krw Exp $
#
# Copyright (c) 2002, Miodrag Vallat.
# All rights reserved.
@@ -69,41 +69,23 @@ ARCH=ARCH
md_installboot() {
}
-# $1 is the disk to check
-md_checkfordisklabel() {
- local rval=0
-
- disklabel $1 >/tmp/checkfordisklabel 2>&1
-
- if grep "disk label corrupted" /tmp/checkfordisklabel; then
- rval=2
- elif grep " HFS " /tmp/checkfordisklabel; then
- rval=3
- fi >/dev/null 2>&1
-
- rm -f /tmp/checkfordisklabel
- return $rval
-}
-
md_prep_disklabel() {
local _disk=$1
- md_checkfordisklabel $_disk
- case $? in
- 3) cat <<__EOT
+ if [[ -n $(disklabel -c $_disk 2>/dev/null | grep ' HFS ') ]]; then
+ cat <<__EOT
This disk has been setup under MacOS. You will now edit a MacOS partition
table. Be careful not to remove the MacOS partitions in use.
__EOT
pdisk /dev/${_disk}c
- ;;
- *) cat <<__EOT
+ else
+ cat <<__EOT
This disk is not shared with MacOS. You will now edit a regular OpenBSD
disklabel.
__EOT
disklabel -W $_disk >/dev/null 2>&1
disklabel -f /tmp/fstab.$_disk -E $_disk
- ;;
- esac
+ fi
}
md_congrats() {