[pve-devel] [PATCH v2 3/3 installer] don't show hd select combobox after raid is chosen

Oguz Bektas o.bektas at proxmox.com
Fri Jan 25 16:26:07 CET 2019


* we don't want the hd select combobox to show up when user goes back
after choosing raid during initial setup

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 proxinstall | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index 3c37239..ffe66a0 100755
--- a/proxinstall
+++ b/proxinstall
@@ -3055,9 +3055,16 @@ sub create_hdsel_view {
 	$target_hd_combo->append_text (get_device_desc($devname, $size, $model));
     }
 
-    $target_hd_combo->set_active(0);
+    my $raid = $config_options->{filesys} =~ m/zfs|btrfs/;
+    if ($raid) {
+	$target_hd_label->set_text("Target: $config_options->{filesys} ");
+	$target_hd_combo->set_visible(0);
+	$target_hd_combo->set_no_show_all(1);
+    }
+    $target_hd_combo->set_active($config_options->{chosen_hd} // 0);
     $target_hd_combo->signal_connect(changed => sub {
 	$a = shift->get_active;
+	$config_options->{chosen_hd} = $a;
 	my ($disk, $devname) = @{@$hds[$a]};
 	$target_hd = $devname;
     });
-- 
2.11.0





More information about the pve-devel mailing list