The branch stable/13 has been updated by dim:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=6258b5bf0670ba0c280ae1e387fcb0f3ba9f3e32

commit 6258b5bf0670ba0c280ae1e387fcb0f3ba9f3e32
Author:     Craig Leres <le...@freebsd.org>
AuthorDate: 2024-12-26 14:42:11 +0000
Commit:     Dimitry Andric <d...@freebsd.org>
CommitDate: 2024-12-30 19:20:17 +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 bd7db75dc5e5..117782763267 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -318,6 +318,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
 
@@ -368,6 +371,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"
@@ -1805,6 +1810,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
 

Reply via email to