extract number of drives, cache and log from pool name
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Sep 2011 13:24:30 +0000 (15:24 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Sep 2011 13:24:30 +0000 (15:24 +0200)
public/code/pool.drives,cache,log.pl [new file with mode: 0644]

diff --git a/public/code/pool.drives,cache,log.pl b/public/code/pool.drives,cache,log.pl
new file mode 100644 (file)
index 0000000..4143f0b
--- /dev/null
@@ -0,0 +1,5 @@
+foreach my $v ( @{ $row->{'pool'} } ) {
+ $update->{$_} = $v =~ s/(\+$_)/$1/ foreach ( 'cache', 'log' );
+ $update->{drives} = $v =~ s/sd/sd/g;
+}
+