From 2310fa35a1b7284829de6202e227bab2b8e69f54 Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Sun, 3 Jul 2022 13:43:57 +0200 Subject: [PATCH] Does not properly capture "Status of Logical Device" while rebuilding See https://github.com/kumy/Parse-Arcconf/issues/3 for details. --- lib/Parse/Arcconf.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Parse/Arcconf.pm b/lib/Parse/Arcconf.pm index 32c6047..7596274 100644 --- a/lib/Parse/Arcconf.pm +++ b/lib/Parse/Arcconf.pm @@ -203,8 +203,10 @@ sub parse_config_fh if ($line =~ /^\S+.*\w\s+(\d+)$/) { $current_logical_drive = $1; - } elsif ($line =~ /^\s+(\S.*\S+)\s+:\s+(.*)$/) { - $ctrl->{'logical drive'}{$current_logical_drive}{$1} = $2; + } elsif ($line =~ /^\s+([^:]+)\s+:\s+(.*)$/) { + my ($an, $av)= ($1, $2); + $an=~ s/\s*$//; + $ctrl->{'logical drive'}{$current_logical_drive}{$an} = $av; } elsif ($line =~ /^\s+-+$/) { my $cat = <$fh>; $cat =~ s/^\s+(\S.*\S+)\s+/$1/; -- GitLab