diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-19 13:46:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-19 13:46:06 +0000 |
commit | 5f326eb90de4950f8b84ef2670504e5816052d51 (patch) | |
tree | 89c19480f10bdd4d37497bde0fa4c44ff122fbdb | |
parent | e38fd8a2b2ba2586a217742214f66513ada4075b (diff) | |
download | drakx-5f326eb90de4950f8b84ef2670504e5816052d51.tar drakx-5f326eb90de4950f8b84ef2670504e5816052d51.tar.gz drakx-5f326eb90de4950f8b84ef2670504e5816052d51.tar.bz2 drakx-5f326eb90de4950f8b84ef2670504e5816052d51.tar.xz drakx-5f326eb90de4950f8b84ef2670504e5816052d51.zip |
cleanup
-rw-r--r-- | perl-install/raid.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 83d5e7dd4..93e491e4a 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -174,11 +174,15 @@ sub inactivate_and_dirty { $part->{notFormatted} = 1; $part->{isFormatted} = 0; } +sub active_mds { + map { if_(/^(md\d+) /, $1) } cat_("/proc/mdstat"); +} + sub is_active { my ($dev) = @_; - cat_("/proc/mdstat") =~ /^$dev /m; + member($dev, active_mds()); } -sub inactivate_all() { run_program::run("raidstop", devices::make("md$_")) foreach 0..max_nb() } +sub inactivate_all() { run_program::run("raidstop", devices::make($_)) foreach active_mds() } 1; |