BUG#24780 use --sysconfdir in scripts
This commit is contained in:
parent
6541302bb2
commit
77965c013c
@ -111,6 +111,7 @@ SUFFIXES = .sh
|
|||||||
-e 's!@''pkglibdir''@!$(pkglibdir)!g' \
|
-e 's!@''pkglibdir''@!$(pkglibdir)!g' \
|
||||||
-e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
|
-e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
|
||||||
-e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
|
-e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
|
||||||
|
-e 's!@''sysconfdir''@!$(sysconfdir)!g' \
|
||||||
-e 's!@''CC''@!@CC@!'\
|
-e 's!@''CC''@!@CC@!'\
|
||||||
-e 's!@''CXX''@!@CXX@!'\
|
-e 's!@''CXX''@!@CXX@!'\
|
||||||
-e 's!@''GXX''@!@GXX@!'\
|
-e 's!@''GXX''@!@GXX@!'\
|
||||||
|
@ -462,8 +462,8 @@ MySQLaccess::Report::Print_Header();
|
|||||||
if (-f "./$script_conf") {
|
if (-f "./$script_conf") {
|
||||||
require "./$script_conf";
|
require "./$script_conf";
|
||||||
}
|
}
|
||||||
elsif (-f "/etc/$script_conf") {
|
elsif (-f "@sysconfdir@/$script_conf") {
|
||||||
require "/etc/$script_conf";
|
require "@sysconfdir@/$script_conf";
|
||||||
}
|
}
|
||||||
|
|
||||||
# ****************************
|
# ****************************
|
||||||
@ -929,7 +929,7 @@ sub MergeConfigFile {
|
|||||||
# =================================
|
# =================================
|
||||||
sub MergeConfigFiles {
|
sub MergeConfigFiles {
|
||||||
my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
|
my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
|
||||||
MergeConfigFile("/etc/my.cnf");
|
MergeConfigFile("@sysconfdir@/my.cnf");
|
||||||
MergeConfigFile("$dir/.my.cnf");
|
MergeConfigFile("$dir/.my.cnf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,9 +429,9 @@ sub find_groups
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (-f "/etc/my.cnf" && -r "/etc/my.cnf")
|
if (-f "@sysconfdir@/my.cnf" && -r "@sysconfdir@/my.cnf")
|
||||||
{
|
{
|
||||||
open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
|
open(MY_CNF, "<@sysconfdir@/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
|
||||||
}
|
}
|
||||||
for ($i = 0; ($line = shift @tmp); $i++)
|
for ($i = 0; ($line = shift @tmp); $i++)
|
||||||
{
|
{
|
||||||
@ -658,7 +658,7 @@ sub example
|
|||||||
# (as per Linux/Unix standard). You may even replace the
|
# (as per Linux/Unix standard). You may even replace the
|
||||||
# /etc/init.d/mysql.server script with it.
|
# /etc/init.d/mysql.server script with it.
|
||||||
#
|
#
|
||||||
# Before using, you must create a my.cnf file either in /etc/my.cnf
|
# Before using, you must create a my.cnf file either in @sysconfdir@/my.cnf
|
||||||
# or /root/.my.cnf and add the [mysqld_multi] and [mysqld#] groups.
|
# or /root/.my.cnf and add the [mysqld_multi] and [mysqld#] groups.
|
||||||
#
|
#
|
||||||
# The script can be found from support-files/mysqld_multi.server.sh
|
# The script can be found from support-files/mysqld_multi.server.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user