summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/hd_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-18 17:00:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-18 17:00:11 +0000
commit562c8c525f7b9bf005c56e589623817a19e23438 (patch)
tree86a8d5a18b187918d962eb78bed852c75f0cded3 /perl-install/diskdrake/hd_gtk.pm
parent8d97f13366221db1ec0b8400dac8fb9c26180621 (diff)
downloaddrakx-562c8c525f7b9bf005c56e589623817a19e23438.tar
drakx-562c8c525f7b9bf005c56e589623817a19e23438.tar.gz
drakx-562c8c525f7b9bf005c56e589623817a19e23438.tar.bz2
drakx-562c8c525f7b9bf005c56e589623817a19e23438.tar.xz
drakx-562c8c525f7b9bf005c56e589623817a19e23438.zip
- diskdrake:
o handle partitions encrypted with cryptsetup
Diffstat (limited to 'perl-install/diskdrake/hd_gtk.pm')
-rw-r--r--perl-install/diskdrake/hd_gtk.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index e89613bcf..a5828783e 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -29,7 +29,7 @@ struct {
string name # which is displayed in tab of the notebook
bool no_auto # wether the kind can disappear after creation
string type # one of { 'hd', 'raid', 'lvm', 'loopback', 'removable', 'nfs', 'smb' }
- hd | hd_lvm | part_raid[] | part_loopback[] | raw_hd[] val
+ hd | hd_lvm | part_raid[] | part_dmcrypt[] | part_loopback[] | raw_hd[] val
#
widget main_box
@@ -250,9 +250,10 @@ sub current_kind_changed {
my $v = $kind->{val};
my @parts =
$kind->{type} eq 'raid' ? grep { $_ } @$v :
+ $kind->{type} eq 'dmcrypt' ? @$v :
$kind->{type} eq 'loopback' ? @$v : fs::get::hds_fstab_and_holes($v);
my $totalsectors =
- $kind->{type} =~ /raid|loopback/ ? sum(map { $_->{size} } @parts) : $v->{totalsectors};
+ $kind->{type} =~ /raid|dmcrypt|loopback/ ? sum(map { $_->{size} } @parts) : $v->{totalsectors};
create_buttons4partitions($kind, $totalsectors, @parts);
}
@@ -279,6 +280,7 @@ sub create_automatic_notebooks {
$may_add->(hd2kind($_)) foreach @{$all_hds->{hds}};
$may_add->(lvm2kind($_)) foreach @{$all_hds->{lvms}};
$may_add->(raid2kind()) if @{$all_hds->{raids}};
+ $may_add->(dmcrypt2kind()) if @{$all_hds->{dmcrypts}};
$may_add->(loopback2kind()) if @{$all_hds->{loopbacks}};
@notebook = grep_index {
@@ -434,6 +436,13 @@ sub raid2kind() {
################################################################################
# loopbacks: helpers
################################################################################
+sub dmcrypt2kind() {
+ { type => 'dmcrypt', name => 'dmcrypt', val => $all_hds->{dmcrypts} };
+}
+
+################################################################################
+# loopbacks: helpers
+################################################################################
sub loopback2kind() {
{ type => 'loopback', name => 'loopback', val => $all_hds->{loopbacks} };
}