Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
ee8ba15f
Unverified
Commit
ee8ba15f
authored
May 28, 2019
by
IKEDA Soji
Committed by
GitHub
May 28, 2019
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sbin/sympa.pl.in
View file @
ee8ba15f
...
...
@@ -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.
v
erify db_xxx parameters in sympa.conf
\n
",
"
Database %s defined in sympa.conf has not the right structure or is unreachable.
V
erify db_xxx parameters in sympa.conf
\n
",
$
Conf::
Conf
{'
db_name
'};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment