summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-19 17:17:16 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-19 17:17:16 +0000
commitf5bdc07ad42a2ffbb8a44d2c6238bb633e02781b (patch)
tree80050d61d74998db8441e4ae59c6baec1203d057
parent327665c753f616babee751a013645f64a83c3f80 (diff)
downloaddrakx-f5bdc07ad42a2ffbb8a44d2c6238bb633e02781b.tar
drakx-f5bdc07ad42a2ffbb8a44d2c6238bb633e02781b.tar.gz
drakx-f5bdc07ad42a2ffbb8a44d2c6238bb633e02781b.tar.bz2
drakx-f5bdc07ad42a2ffbb8a44d2c6238bb633e02781b.tar.xz
drakx-f5bdc07ad42a2ffbb8a44d2c6238bb633e02781b.zip
(_get_existing_one_with_state) split it out of open_part()
(read_crypttab) try harder to get enough data ({dm_active}) (idea from Colin, mga#5661)
-rw-r--r--perl-install/fs/dmcrypt.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/fs/dmcrypt.pm b/perl-install/fs/dmcrypt.pm
index 0926ed87a..0e5c3c19e 100644
--- a/perl-install/fs/dmcrypt.pm
+++ b/perl-install/fs/dmcrypt.pm
@@ -39,6 +39,7 @@ sub read_crypttab_ {
or log::l("crypttab: unknown device $dev for $dm_name"), next;
$raw_part->{dm_name} = $dm_name;
+ _get_existing_one_with_state($raw_part);
}
}
@@ -90,9 +91,15 @@ sub open_part {
});
run_program::run('udevadm', 'settle');
+ push @$dmcrypts, _get_existing_one_with_state($part);
+}
+
+
+sub _get_existing_one_with_state {
+ my ($part) = @_;
my $active_dmcrypt = _parse_dmsetup_table($part->{dm_name},
run_program::get_stdout('dmsetup', 'table', $part->{dm_name}));
- push @$dmcrypts, _get_existing_one([$part], $active_dmcrypt);
+ _get_existing_one([$part], $active_dmcrypt);
}
sub close_part {