summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/partitioning_wizard.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-19 17:17:09 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-19 17:17:09 +0000
commita0a2b0e1819a65000a7efd68072ecb72dd8356ae (patch)
treeb1ef3fa3c5fcea387e9b3cfcd9c64cfe1f05d8d3 /perl-install/fs/partitioning_wizard.pm
parentb5cd68029b40c6a92ba67f35d05a30853119c075 (diff)
downloaddrakx-a0a2b0e1819a65000a7efd68072ecb72dd8356ae.tar
drakx-a0a2b0e1819a65000a7efd68072ecb72dd8356ae.tar.gz
drakx-a0a2b0e1819a65000a7efd68072ecb72dd8356ae.tar.bz2
drakx-a0a2b0e1819a65000a7efd68072ecb72dd8356ae.tar.xz
drakx-a0a2b0e1819a65000a7efd68072ecb72dd8356ae.zip
fix losing crypt key when re-reeading partition tables (mga#5661)
Diffstat (limited to 'perl-install/fs/partitioning_wizard.pm')
-rw-r--r--perl-install/fs/partitioning_wizard.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index 12216bcf4..0aa8f82f4 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -38,9 +38,14 @@ sub partition_with_diskdrake {
do {
$ok = 1;
my $do_force_reload = sub {
+ require File::Temp;
+ my (undef, $tmp_file) = File::Temp::mkstemp('/tmp/crypttab.XXXXXXX');
+ fs::dmcrypt::save_crypttab_($all_hds, $tmp_file);
my $new_hds = fs::get::empty_all_hds();
fs::any::get_hds($new_hds, $fstab, $manual_fstab, $partitioning_flags, $skip_mtab, $in);
%$all_hds = %$new_hds;
+ fs::dmcrypt::read_crypttab_($all_hds, $tmp_file);
+ rm_rf($tmp_file);
$all_hds;
};
require diskdrake::interactive;