mariadb/mysql-logrotate.patch
OBS User autobuild 9301fefeac Accepting request 39217 from server:database
Copy from server:database/mariadb based on submit request 39217 from user -miska-

OBS-URL: https://build.opensuse.org/request/show/39217
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=1
2010-05-05 21:42:29 +00:00

29 lines
822 B
Diff

Index: support-files/mysql-log-rotate.sh
===================================================================
--- support-files/mysql-log-rotate.sh.orig
+++ support-files/mysql-log-rotate.sh
@@ -18,7 +18,7 @@
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !
-@localstatedir@/mysqld.log {
+/var/log/mysql/mysqld.log {
# create 600 mysql mysql
notifempty
daily
@@ -31,6 +31,14 @@
@bindir@/mysqladmin ping &>/dev/null
then
@bindir@/mysqladmin flush-logs
+ ret=$?
+ if test $ret -ne 0
+ then
+ echo "@sysconfdir@/logrotate.d/mysql failed, probably because" >&2
+ echo "the root acount is protected by password." >&2
+ echo "See comments in @sysconfdir@/logrotate.d/mysql on how to fix this" >&2
+ exit $ret
+ fi
fi
endscript
}