1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-6485 Hard-coded paths in the source cannot be opt-out

when looking for my.cnf files: if DEFAULT_SYSCONFDIR (or INSTALL_SYSCONFDIR)
is specified (for rpms it always is), use that instead of hardcoded /etc path.
This commit is contained in:
Sergei Golubchik
2014-08-03 17:13:56 +02:00
parent 82ce2a2503
commit 91c47e6fdf
5 changed files with 25 additions and 42 deletions

View File

@ -499,9 +499,9 @@ sub list_defaults_files
my %seen; # Don't list the same file more than once
return grep { defined $_ and not $seen{$_}++ and -f $_ and -r $_ }
('/etc/my.cnf',
'/etc/mysql/my.cnf',
'@sysconfdir@/my.cnf',
('@sysconfdir@/my.cnf',
'@sysconfdir@/mysql/my.cnf',
'@prefix@/my.cnf',
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
$opt{'extra-file'},
($ENV{HOME} ? "$ENV{HOME}/.my.cnf" : undef));
@ -632,7 +632,7 @@ sub example
{
print <<EOF;
# This is an example of a my.cnf file for $my_progname.
# Usually this file is located in home dir ~/.my.cnf or /etc/my.cnf
# Usually this file is located in home dir ~/.my.cnf or @sysconfdir@/my.cnf
#
# SOME IMPORTANT NOTES FOLLOW:
#
@ -705,7 +705,7 @@ sub example
# (as per Linux/Unix standard). You may even replace the
# /etc/init.d/mysql.server script with it.
#
# Before using, you must create a my.cnf file either in @sysconfdir@/my.cnf
# Before using, you must create a my.cnf file either in @prefix@/my.cnf
# or /root/.my.cnf and add the [mysqld_multi] and [mysqld#] groups.
#
# The script can be found from support-files/mysqld_multi.server.sh