[PATCH 2/2] create_raid_advanced_grid: add text box for zfs native encryption

Gregor Michels hirnpfirsich at brainpeach.de
Thu Mar 31 00:22:09 CEST 2022


---
 proxinstall | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/proxinstall b/proxinstall
index 7dd22b7..b10ec0a 100755
--- a/proxinstall
+++ b/proxinstall
@@ -13,6 +13,7 @@ use IO::File;
 use IO::Select;
 use Cwd 'abs_path';
 use Glib;
+use Glib 'FALSE';
 use Gtk3 '-init';
 use Gtk3::WebKit2;
 use Encode;
@@ -3095,6 +3096,18 @@ my $create_raid_advanced_grid = sub {
     push @$labeled_widgets, "checksum";
     push @$labeled_widgets, $combo_checksum;
 
+    my $text_passphrase = Gtk3::Entry->new();
+    $text_passphrase->set_tooltip_text("encrypt pool with this passphrase via zfs native encryption");
+    $text_passphrase->set_visibility(FALSE);
+    $text_passphrase->signal_connect (changed => sub {
+        my $w = shift;
+        $config_options->{zfs_passphrase} = $w->get_text();
+    });
+    $config_options->{zfs_passphrase} = "" if !($config_options->{zfs_passphrase});
+    $text_passphrase->set_text($config_options->{zfs_passphrase});
+    push @$labeled_widgets, "passphrase";
+    push @$labeled_widgets, $text_passphrase;
+
     my $spinbutton_copies = Gtk3::SpinButton->new_with_range(1,3,1);
     $spinbutton_copies->set_tooltip_text("zfs copies property for rpool dataset (in addition to RAID redundancy!)");
     $spinbutton_copies->signal_connect ("value-changed" => sub {
-- 
2.20.1





More information about the pve-devel mailing list