From 664b5db5ab97bf86e785bf264ffbb25ce4e39488 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Fri, 10 Apr 2009 23:11:18 +0000 Subject: Where appropriate display the auto-allocation layout of the root disk and ask if the installee wants to use it, edit it, or create their own custom disklabel. Most one-disk installs will not need to see fdisk or disklabel. i386 and macppc by me, adapted for others by deraadt@. ok deraadt@ --- distrib/sparc64/common/install.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'distrib/sparc64') diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index cc977d321a3..7bc23d2f026 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.22 2008/06/26 05:42:04 ray Exp $ +# $OpenBSD: install.md,v 1.23 2009/04/10 23:11:17 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -67,10 +67,26 @@ md_installboot() { } md_prep_disklabel() { - local _disk=$1 + local _disk=$1 _f _op disklabel -W $_disk >/dev/null 2>&1 - disklabel -f /tmp/fstab.$_disk -E $_disk + _f=/tmp/fstab.$_disk + if [[ $_disk == $ROOTDISK ]]; then + while :; do + echo "The auto-allocated layout for $_disk is:" + disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:" + ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a + case $resp in + a*|A*) _op=-w ; AUTOROOT=y ;; + e*|E*) _op=-E ;; + c*|C*) break ;; + *) continue ;; + esac + disklabel -f $_f $_op -A $_disk + return + done + fi + disklabel -f $_f -E $_disk } md_congrats() { -- cgit v1.2.3