summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.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/fsedit.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/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 81564bb1b..d0d9b6a2e 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -72,6 +72,21 @@ sub raids {
raid::get_existing(@l);
}
+sub dmcrypts {
+ my ($all_hds) = @_;
+
+ my @parts = fs::get::fstab($all_hds);
+
+ my @l = grep { fs::type::isRawLUKS($_) } @parts or return;
+
+ log::l("using dm-crypt from " . join(' ', map { $_->{device} } @l));
+
+ require fs::dmcrypt;
+ fs::dmcrypt::read_crypttab($all_hds);
+
+ fs::dmcrypt::get_existing(@l);
+}
+
sub lvms {
my ($all_hds) = @_;
my @pvs = grep { isRawLVM($_) } fs::get::fstab($all_hds) or return;
@@ -267,6 +282,9 @@ Do you agree to lose all the partitions?
fs::get_major_minor([ fs::get::fstab($all_hds) ]);
+ # must be done after getting major/minor
+ $all_hds->{dmcrypts} = [ dmcrypts($all_hds) ];
+
$_->{faked_device} = 0 foreach fs::get::fstab($all_hds);
$all_hds;