Bug#383543: mysql-server: logrotate script fails if mysqld is not running

2011-01-19 Thread Bram Schoenmakers
Apologies for bringing this up after such a long time, but it seems
that this bug is present without 3rd party packages involved. The
Akonadi daemon, part of KDE 4, launches its own instance and affects
the output of ps cax | grep mysqld :

  /usr/sbin/mysqld
--defaults-file=/home/bram/.local/share/akonadi//mysql.conf
--datadir=/home/bram/.local/share/akonadi/db_data/socket=/home/bram/.local/share/akonadi/db_misc/mysql.socket

To fix this in /etc/logrotate.d/mysql-server, I check for the
existence of the socket on its main location:

  if ps cax | grep -q mysqld; then

becomes

  if [ -S '/var/run/mysqld/mysqld.sock' ]; then

But I wonder if this solution applies in general, but at least it
supports Debian's default settings.

-- 
Bram Schoenmakers



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#383543: mysql-server: logrotate script fails if mysqld is not running

2006-08-17 Thread Andrew Baumann
Package: mysql-server
Severity: minor

Hi,

I get the following output from logrotate:
 
/etc/cron.daily/logrotate:
error: error running shared postrotate script for /var/log/mysql.log 
/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log 
run-parts: /etc/cron.daily/logrotate exited with return code 1

Looking at the relevant script, it has:
if [ -z `$MYADMIN ping 2/dev/null` ]; then
  # Really no mysqld or rather a missing debian-sys-maint user?
  # If this occurs and is not a error please report a bug.
  if ps cax | grep -q mysqld; then
exit 1
  fi
I have mysql-server installed for another 3rd party package that starts
its own copy of mysqld with its own config file etc., so there is a 
mysqld process, but it doesn't use the config files under /etc/mysql 
(and it's not running as the normal user either). I'm not running mysqld
from /etc/init.d/mysql, because I don't need it.

As requested, in the comment, I'm reporting this as a bug. I realise it 
is a tricky case, sorry about that. Maybe you could provide a config 
file /etc/default/mysql, and allow a user to set a variable like 
MYSQLD_ENABLE=no, that would prevent the daemon from starting, and 
also prevent the logrotate scripts from trying to do anything.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]