marsadm: Fixed check_splitbrain() to allow obsolete version link syntax

Signed-off-by: Thomas Schoebel-Theuer <schoebel@bell.site>
This commit is contained in:
Daniel Hermann 2013-03-05 14:29:51 +01:00 committed by Thomas Schoebel-Theuer
parent be57ca7949
commit 01340092de
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ sub check_splitbrain {
my $version = readlink($link) or ldie "cannot read symlink '$link'\n";
my $otherhost = $version;
$otherhost =~ s:^[^,]*?,log-[0-9]*?-([^,]*?),.*$:$1:;
$otherhost =~ s/^[^,]*?,(?:log-[0-9]*?-|)([^,]*?),.*$/$1/;
my $otherlink = sprintf("$mars/resource-$res/version-%09d-$otherhost", $nr);
my $otherversion = readlink($otherlink) or ldie "cannot read symlink '$otherlink'\n";