Unverified Commit ee8ba15f authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #619 from ldidry/fix-609 by ldidry

Fix #609 — Handle boilerplate db_type conf in sympa.pl --health_check
parents 686adb14 0807b797
......@@ -212,10 +212,24 @@ if ($main::options{'upgrade_config_location'}) {
$Conf::Conf{'etc'};
}
## Check if db_type is not the boilerplate one
if ($Conf::Conf{'db_type'} eq '(You must define this parameter)') {
die sprintf
"Database type \"%s\" defined in sympa.conf is the boilerplate one and obviously incorrect. Verify db_xxx parameters in sympa.conf\n",
$Conf::Conf{'db_type'};
}
## Preliminary check of db_type
unless ($Conf::Conf{'db_type'} and $Conf::Conf{'db_type'} =~ /\A\w+\z/) {
die sprintf
"Database type \"%s\" defined in sympa.conf seems incorrect. Verify db_xxx parameters in sympa.conf\n",
$Conf::Conf{'db_type'};
}
## Check database connectivity and probe database
unless (Sympa::DatabaseManager::probe_db()) {
die sprintf
"Database %s defined in sympa.conf has not the right structure or is unreachable. verify db_xxx parameters in sympa.conf\n",
"Database %s defined in sympa.conf has not the right structure or is unreachable. Verify db_xxx parameters in sympa.conf\n",
$Conf::Conf{'db_name'};
}
......
Supports Markdown
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