Support --defaults-group-suffix option in all starting scripts
Resolves: #1485777
This commit is contained in:
parent
ebda147116
commit
036ca48a16
@ -1448,6 +1448,8 @@ fi
|
||||
* Mon Aug 28 2017 Honza Horak <hhorak@redhat.com> - 3:10.2.8-2
|
||||
- Fix paths in galera_recovery and galera_new_cluster
|
||||
Resolves: #1403416
|
||||
- Support --defaults-group-suffix properly in systemd unit file
|
||||
Resolves: #1485777
|
||||
|
||||
* Sun Aug 20 2017 Honza Horak <hhorak@redhat.com> - 3:10.2.8-1
|
||||
- Rebase to 10.2.8
|
||||
|
@ -18,13 +18,23 @@ get_mysql_option(){
|
||||
sections="$1"
|
||||
option_name="$2"
|
||||
default_value="$3"
|
||||
result=`@bindir@/my_print_defaults $sections | sed -n "s/^--${option_name}=//p" | tail -n 1`
|
||||
result=`@bindir@/my_print_defaults $my_print_defaults_extra_args $sections | sed -n "s/^--${option_name}=//p" | tail -n 1`
|
||||
if [ -z "$result" ]; then
|
||||
# not found, use default
|
||||
result="${default_value}"
|
||||
fi
|
||||
}
|
||||
|
||||
# For the case of running more instances via systemd, scrits that source
|
||||
# this file can get --default-group-suffix or similar option as the first
|
||||
# argument. The utility my_print_defaults needs to use it as well, so the
|
||||
# scripts sourcing this file work with the same options as the daemon.
|
||||
my_print_defaults_extra_args=''
|
||||
while echo "$1" | grep -q '^--defaults' ; do
|
||||
my_print_defaults_extra_args="${my_print_defaults_extra_args} $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# Defaults here had better match what mysqld_safe will default to
|
||||
# The option values are generally defined on three important places
|
||||
# on the default installation:
|
||||
|
@ -40,13 +40,13 @@ Type=notify
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
ExecStartPre=@libexecdir@/mysql-check-socket
|
||||
ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
|
||||
ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
|
||||
ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
||||
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
||||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
||||
|
||||
# Setting this to true can break replication and the Type=notify settings
|
||||
# See also bind-address mysqld option.
|
||||
|
Loading…
Reference in New Issue
Block a user