summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/diskdrake/interactive.pm1
-rw-r--r--perl-install/raid.pm5
2 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 0f97ad314..83b8c3310 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -815,6 +815,7 @@ sub Add2RAID {
if (ref($md_part)) {
raid::add($md_part, $part);
} else {
+ raid::check_prog($in) or return;
my $md_part = raid::new($raids, disks => [ $part ]);
modifyRAID($in, $raids, $md_part) or return raid::delete($raids, $md_part);
}
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index acbee3607..1570712db 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -15,6 +15,11 @@ use fs;
sub max_nb() { 31 }
+sub check_prog {
+ my ($in) = @_;
+ $in->do_pkgs->ensure_binary_is_installed('mdadm', 'mdadm') or return;
+}
+
sub new {
my ($raids, %opts) = @_;
my $md_part = { %opts };