diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-05-31 19:40:12 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-05-31 19:40:12 +0000 |
commit | 6f39b0ff9a313e2af7b93085787d409c1c1453e3 (patch) | |
tree | 3f7fde2797aade6486218968d307eaadf174251f /distrib/sparc64 | |
parent | ee8cc5a387b2b975f8d2ebd7d500640ba40558c7 (diff) |
Replace identical code in the MD scripts of the installer with a new
MI function disklabel_autolayout() which now handles all aspects of
the disklabel auto-layout and autopartitioning case for the root disk.
Remove get_disklabel_template() and merge it with the new function.
"move forward" deraadt@
Diffstat (limited to 'distrib/sparc64')
-rw-r--r-- | distrib/sparc64/common/install.md | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index cdf32b97cf8..fc2a875f0d4 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.43 2015/05/04 19:55:27 rpe Exp $ +# $OpenBSD: install.md,v 1.44 2015/05/31 19:40:11 rpe Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -49,29 +49,11 @@ md_installboot() { } md_prep_disklabel() { - local _disk=$1 _f _op + local _disk=$1 _f=/tmp/fstab.$1 + + disklabel_autolayout $_disk $_f || return + [[ -s $_f ]] && return - _f=/tmp/fstab.$_disk - if [[ $_disk == $ROOTDISK ]]; then - if $AUTO && get_disklabel_template; then - disklabel -T /disklabel.auto $FSTABFLAG $_f -w -A $_disk && return - echo "Autopartitioning failed" - exit 1 - fi - while :; do - echo "The auto-allocated layout for $_disk is:" - disklabel -h -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 ;; - e*|E*) _op=-E ;; - c*|C*) break ;; - *) continue ;; - esac - disklabel $FSTABFLAG $_f $_op -A $_disk - return - done - fi cat <<__EOT You will now create a Sun-style disklabel on the disk. The disklabel defines |