git: 7d6ae5874ede - stable/14 - bsdinstall zfsboot: Add an option to edit the ZFS pool creation options
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Dec 2024 19:20:59 UTC
The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7d6ae5874ede58771d8979049bf742086658cf82 commit 7d6ae5874ede58771d8979049bf742086658cf82 Author: Craig Leres <leres@FreeBSD.org> AuthorDate: 2024-12-26 14:42:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-12-30 19:20:13 +0000 bsdinstall zfsboot: Add an option to edit the ZFS pool creation options This allows the default options (-O compress=lz4 -O atime=off) to be overridden, before the ZFS boot pool is created. For example, to set the compression algorithm to something different. Reviewed by: jhb, dim MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47478 (cherry picked from commit ca7e12f7df222458ec5cac8009c5b0931fb4a95b) --- usr.sbin/bsdinstall/scripts/zfsboot | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index e7fd59d5c8b3..93d9490f972a 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -324,6 +324,9 @@ msg_unsupported_partition_scheme="%s is an unsupported partition scheme" msg_user_cancelled="User Cancelled." msg_yes="YES" msg_zfs_configuration="ZFS Configuration" +msg_please_enter_options_for_your_zpool="Please enter options for your zpool" +msg_zfs_options_name="ZFS Pool Options" +msg_zfs_options_name_help="Customize ZFS options for the zpool to be created" ############################################################ FUNCTIONS @@ -374,6 +377,8 @@ dialog_menu_main() '$msg_swap_mirror_help' 'W $msg_swap_encrypt' '$swapgeli' '$msg_swap_encrypt_help' + 'O $msg_zfs_options_name' '$ZFSBOOT_POOL_CREATE_OPTIONS' + '$msg_zfs_options_name_help' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" @@ -1853,6 +1858,13 @@ while :; do ZFSBOOT_SWAP_ENCRYPTION=1 fi ;; + ?" $msg_zfs_options_name") + # Prompt the user to input/change the pool options + f_dialog_input input \ + "$msg_please_enter_options_for_your_zpool" \ + "$ZFSBOOT_POOL_CREATE_OPTIONS" && + ZFSBOOT_POOL_CREATE_OPTIONS="$input" + ;; esac done