summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
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;