#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1240 2023/04/07 09:40:18 kn Exp $
+# $OpenBSD: install.sub,v 1.1241 2023/04/07 13:48:42 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
# Install sets from disk.
# Ask for the disk device containing the set files.
install_disk() {
- if ! ask_yn "Is the disk partition already mounted?" yes; then
+ local _ismounted=yes
+
+ # No partitions are mounted prior to regular installation.
+ [[ $MODE == install ]] && _ismounted=no
+
+ if ! ask_yn "Is the disk partition already mounted?" $_ismounted; then
ask_which "disk" "contains the $MODE media" \
'$(bsort $(get_dkdevs))' \
'$(get_dkdevs_uninitialized)'