From nobody Sun Apr 10 21:15:37 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 182C01A9ACEF; Sun, 10 Apr 2022 21:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kc4XB07lLz3qxH; Sun, 10 Apr 2022 21:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649625338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6O45Ew5po8OGtBNR3LtBKeXJFRwigk4D9zPkDVxA8Es=; b=LR3hYscP88+cz0EGoD27B84bAulZgPs1O5yMBdgNbcu7nfjn+ctQ7JKCsr4ptIR0+WAAD1 mn41oRdeHhB4js/O3PNt/28b5a6lawz4FfzApIbV30owFqupjGm+ifZ732pRXTX47OnjE3 EBJKCcmZ7QM+xWREgI3JCzBAhciyPciexAMdtiBpZLxWTbb8grxWy5l+6pIvNz5lJS3f/1 DBdlScdWooZpoK6zOQMoP6dCkXOC4LGw9gfPthBNFtDOB0eL/Uo2JGimrow8A04iqUOxbf ZahKV0fyNt2idmy1R4U3oamv+8gXyuWuTRTObtbTcyoTSnWFOHBIhC6Pqdc9ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D915315DE6; Sun, 10 Apr 2022 21:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23ALFbh9095519; Sun, 10 Apr 2022 21:15:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23ALFbKk095518; Sun, 10 Apr 2022 21:15:37 GMT (envelope-from git) Date: Sun, 10 Apr 2022 21:15:37 GMT Message-Id: <202204102115.23ALFbKk095518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: be0d16b0b05c - main - bsdinstall: filter out disks that are unavailable from the list of options in ZFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be0d16b0b05c2dea432e4de1cae03b32f8a55ca3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649625338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6O45Ew5po8OGtBNR3LtBKeXJFRwigk4D9zPkDVxA8Es=; b=LmVmPAjxKCqh2y6NPY1Pb7dPwyRAsw8MXe6BY+nrD+KNIMbLIM2zlo72gXFUw4SNs0zFeb xVDt7MREktdGFKi33JksNMjPGYYY2q8CyAqWSyGXMyZEiuT2NnQ7EM1wZLG891d1R+p5h7 WKnHlgV9P2LnBIiiNLP4Z8d8yvozPiZjDrsGiG6ITnfNB3xMNDOdNShOw4g3W3GjKIapwK ZvBzpOcIAPr5cK/05Hwxg9wx2yJzladvWkXlDsPI7aW4QlhpthgRiSYjmKpWrpR+5ckL5+ tEI4/PmaBj3s2W/8LmWJwu5gHif82tc63mVtkDhx6L2S1xbdLP8XuxDdkeWRcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649625338; a=rsa-sha256; cv=none; b=RMyPEIZFOgvbJ5U3g/2oYMij8YicdiCYHuMjXP8/3Ix0tv+80dmNgrLtnbgmdhMvbBvHxC 0lP6v56kutd6XKA84CDQ1w/gXELHtC2CUJs4YeZKP7Ja9l5YNkB59Nk9Lw7lTcmbjC4P1F /0XTBoNfJKV8rjlO5msY4U2sEJsxTRcaWL61pJrSFnDjT6WVX0slNTUto1A+NBkPShRoyz FK5AoTDiveVB8FP9lQR+me8OGjDsoKZ/ZazQhOFCUAO6+PGcus02Tv40fFN4VIgrBtJJuR 5juzZIdrSTIGkHiKX2npBbG/d+w2iwzsHXxkrYF8nZFahd4BFAq9HnrwwSwCAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=be0d16b0b05c2dea432e4de1cae03b32f8a55ca3 commit be0d16b0b05c2dea432e4de1cae03b32f8a55ca3 Author: Brad Davis AuthorDate: 2022-04-10 19:59:31 +0000 Commit: Brad Davis CommitDate: 2022-04-10 21:09:14 +0000 bsdinstall: filter out disks that are unavailable from the list of options in ZFS Reviewed by: allanjude, rew Differential Revision: https://reviews.freebsd.org/D34167 Sponsored by: Rubicon Communications, LLC ("Netgate") --- usr.sbin/bsdinstall/scripts/zfsboot | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 1c689af5c497..ab2cfba04d29 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -533,6 +533,15 @@ dialog_menu_layout() done disks="${new_list# }" + # Prune out disks that are not available to install to + local avail_disks= + for disk in $disks; do + debug= $disk get name name + geom disk list $name | awk '$1 == "Mode:" && $2 != "r0w0e0" { exit 1 }' + [ $? -eq 0 ] && avail_disks="$avail_disks $disk" + done + disks="${avail_disks# }" + # Debugging if [ "$debug" ]; then local disk_names=