Commit b2440e74 authored by Julius Goryavsky's avatar Julius Goryavsky

Improved error messages and added another path to the version check utility

parent cf7a8b9e
...@@ -123,8 +123,8 @@ sub find_bin { ...@@ -123,8 +123,8 @@ sub find_bin {
} }
# Wsrep version check utility: # Wsrep version check utility:
$wsrep_check_version= $wsrep_check_version=
my_find_bin($bindir, "lib/My/SafeProcess", "wsrep_check_version", my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
NOT_REQUIRED); "wsrep_check_version", NOT_REQUIRED);
} }
......
...@@ -401,9 +401,19 @@ sub check_wsrep_version() { ...@@ -401,9 +401,19 @@ sub check_wsrep_version() {
} }
sub wsrep_version_message() { sub wsrep_version_message() {
if ($My::SafeProcess::wsrep_check_version ne "") {
my $output= `$My::SafeProcess::wsrep_check_version -p`; my $output= `$My::SafeProcess::wsrep_check_version -p`;
if (($? >> 8) == 0) {
$output =~ s/\s+\z//; $output =~ s/\s+\z//;
return "Wsrep provider version mismatch (".$output.")"; return "Wsrep provider version mismatch (".$output.")";
}
else {
return "Galera library does not contain a version symbol";
}
}
else {
return "Unable to find a wsrep version check utility";
}
} }
sub which($) { return `sh -c "command -v $_[0]"` } sub which($) { return `sh -c "command -v $_[0]"` }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment