diff options
author | Christopher Odenbach <odenbach@uni-paderborn.de> | 2018-11-22 11:54:10 +0100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2021-12-03 15:34:08 +1100 |
commit | 1b0fb2faa9019ce35b9aea56eaafa82a5b3d4c5b (patch) | |
tree | 36572952c4a4c8e1f385955b381a6615dde732ec | |
parent | d7b37de9360d2db213dbcd95d2231f53ed00208d (diff) | |
download | mariadb-git-1b0fb2faa9019ce35b9aea56eaafa82a5b3d4c5b.tar.gz |
Fix logrotate problem with twice configured pid-file option
Hi,
if the pid-file option is configured more than once (e.g. multiple times in different files), my_print_defaults prints it twice, resulting in the logrotate postrotate script failing because of a syntax error. Debian fixed this already (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830976#42).
Perhaps you could implement this small change in the other branches as well?
Thanks,
Christopher
-rw-r--r-- | debian/mariadb-server-10.4.mysql-server.logrotate | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/mariadb-server-10.4.mysql-server.logrotate b/debian/mariadb-server-10.4.mysql-server.logrotate index 4111a276dc3..34ef6385e8e 100644 --- a/debian/mariadb-server-10.4.mysql-server.logrotate +++ b/debian/mariadb-server-10.4.mysql-server.logrotate @@ -11,7 +11,7 @@ sharedscripts postrotate test -x /usr/bin/mysqladmin || exit 0 - if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then + if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then # If this fails, check debian.conf! mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \ flush-engine-log flush-general-log flush-slow-log |