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
commit4a14ac7c15b6433965505156c6888858531b2dfd (patch)
tree80050d61d74998db8441e4ae59c6baec1203d057
parentb2b6c3a83abcafd37eae00354c3cf14f0472869c (diff)
downloaddrakx-backup-do-not-use-4a14ac7c15b6433965505156c6888858531b2dfd.tar
drakx-backup-do-not-use-4a14ac7c15b6433965505156c6888858531b2dfd.tar.gz
drakx-backup-do-not-use-4a14ac7c15b6433965505156c6888858531b2dfd.tar.bz2
drakx-backup-do-not-use-4a14ac7c15b6433965505156c6888858531b2dfd.tar.xz
drakx-backup-do-not-use-4a14ac7c15b6433965505156c6888858531b2dfd.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 {