diff options
Diffstat (limited to 'rescue/bin/guessmounts')
-rwxr-xr-x | rescue/bin/guessmounts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rescue/bin/guessmounts b/rescue/bin/guessmounts index 55d18ef58..c5dc5996b 100755 --- a/rescue/bin/guessmounts +++ b/rescue/bin/guessmounts @@ -58,6 +58,22 @@ if (@$raid_parts) { push @$normal_parts, @$raids; } +# Basically doing fsedit::dmcrypts(): +(my $luks_parts, $normal_parts) = partition { isRawLUKS($_) } @$normal_parts; +if (@$luks_parts) { + use interactive; + use interactive::curses; + require diskdrake::interactive; + my $in = interactive->vnew('su'); + my $all_hds = fsedit::get_hds({}, $in); + # Unlocking them in order to look at their fs (do they hold a Mageia installation): + foreach my $part (@$luks_parts) { + diskdrake::interactive::dmcrypt_open($in, undef, $part, $all_hds) + } + my @dmcrypts = fs::dmcrypt::get_existing(@$luks_parts); + push @$normal_parts, @dmcrypts; +} + my @roots; my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); |