diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-02-23 02:34:10 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-02-23 02:34:10 +0000 |
commit | e28f4b21b62ef41b397ae54e6f81faaeef66bec1 (patch) | |
tree | b1657e618209c292477b21375a0b4d58e113d08f /distrib | |
parent | 81bb00ffadf24cf9c79f1bf44beb85970ba903de (diff) |
In the great pdisk churn we lost a pdisk pecularity in disk name
handling. "pdisk -l /dev/wd0c" used to work as well as "pdisk -l
/dev/rwd0c". The new, more fdisk-like, code does not accept the
former.
Adjust the install scripts to eliminate the use of "/dev/wd0c"
constructs and, like fdisk, simply use 'wd0'.
Fixes macppc installs to HFS partitioned disks.
Discovered and diff by rpe@.
ok rpe@ deraadt@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/macppc/ramdisk/install.md | 8 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index b8e4d014513..e0bf1c17daf 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.67 2016/02/08 17:39:37 krw Exp $ +# $OpenBSD: install.md,v 1.68 2016/02/23 02:34:09 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ md_prep_MBR() { WARNING: Putting an MBR partition table on $_disk will DESTROY the existing HFS partitions and HFS partition table: -$(pdisk -l /dev/${_disk}c) +$(pdisk -l $_disk) __EOT ask_yn "Are you *sure* you want an MBR partition table on $_disk?" @@ -127,12 +127,12 @@ md_prep_HFS() { _d=Modify disk_has $_disk hfs openbsd && { _q="Use the (O)penBSD partition, "; _d=OpenBSD; } - pdisk -l /dev/${_disk}c + pdisk -l $_disk ask "$_q(M)odify a partition or (A)bort?" "$_d" case $resp in [aA]*) return 1 ;; [oO]*) return 0 ;; - [mM]*) pdisk /dev/${_disk}c + [mM]*) pdisk $_disk disk_has $_disk hfs openbsd && break echo "\nNo 'OpenBSD'-type partition named 'OpenBSD'!" esac diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 081f8cae9e4..a04f6aee8d0 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.879 2016/02/20 12:08:55 rpe Exp $ +# $OpenBSD: install.sub,v 1.880 2016/02/23 02:34:09 krw Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -295,7 +295,7 @@ disk_has() { [[ -n $_disk && -n $_pttype ]] || exit # Commands to inspect disk. Default: "fdisk $_disk" - local _c_hfs="pdisk -l /dev/${_disk}c" + local _c_hfs="pdisk -l $_disk" local _c_sr="bioctl -q $_disk" # Patterns for partition-table-types and partition-types. |