diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-11-08 12:48:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-11-08 12:48:35 +0000 |
commit | efe40c08d9027aaf0cae2d2803923122b65c8b16 (patch) | |
tree | 100ce70d0748406f75237c8677685b8f0d3baa22 /perl-install | |
parent | ac0cb53525eba687d1dc23d9fe98c7b58f4dfded (diff) | |
download | drakx-efe40c08d9027aaf0cae2d2803923122b65c8b16.tar drakx-efe40c08d9027aaf0cae2d2803923122b65c8b16.tar.gz drakx-efe40c08d9027aaf0cae2d2803923122b65c8b16.tar.bz2 drakx-efe40c08d9027aaf0cae2d2803923122b65c8b16.tar.xz drakx-efe40c08d9027aaf0cae2d2803923122b65c8b16.zip |
log is mixed with valid data (bugzilla #19654)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/patch/patch-2006-fix-parsing-dmraid.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/perl-install/patch/patch-2006-fix-parsing-dmraid.pl b/perl-install/patch/patch-2006-fix-parsing-dmraid.pl new file mode 100644 index 000000000..4e42dde56 --- /dev/null +++ b/perl-install/patch/patch-2006-fix-parsing-dmraid.pl @@ -0,0 +1,42 @@ +log::l("PATCH: 2006-fix-parsing-dmraid"); + +use fsedit; +package fsedit; + +my $old_handle_dmraid = \&handle_dmraid; + +undef *handle_dmraid; +*handle_dmraid = sub { + my ($drives) = @_; + + @$drives > 1 or return; + + devices::make($_->{device}) foreach @$drives; + + require fs::dmraid; + + log::l("PATCH: 2006-fix-parsing-dmraid (inside handle_dmraid)"); + + undef *fs::dmraid::_raid_devices_raw; + *fs::dmraid::_raid_devices_raw = sub { + map { + chomp; + log::l("got: $_"); + my %l; @l{qw(pv format vg level status size)} = split(':'); + if_(defined $l{size}, \%l); + } fs::dmraid::call_dmraid('-ccr'); + }; + + + undef *fs::dmraid::_sets_raw; + *fs::dmraid::_sets_raw = sub { + map { + chomp; + log::l("got: $_"); + my %l; @l{qw(name size stride level status subsets devs spares)} = split(':'); + if_(defined $l{spares}, \%l); + } fs::dmraid::call_dmraid('-ccs'); + }; + + &$old_handle_dmraid; +}; |