[debian-mysql] Bug#583611: mysql-server-5.1: init script breaks on package deinstallation (fails to check for binary)

Roger Leigh rleigh at debian.org
Fri May 28 19:44:43 UTC 2010


Package: mysql-server-5.1
Version: 5.1.46-1
Severity: important
Tags: patch

% sudo /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

% mysql-server-5.1 | grep ^Status
Status: deinstall ok config-files

Please add a check for the server binary before executing any script
actions like all other init scripts.  You are actually doing this:

test -x /usr/sbin/mysqld || exit 0

but since /usr/sbin/mysqld lives in the mysql-server-core-5.1 package,
this check is broken.  Consider using a binary only found in this
package, for example /usr/bin/mysqld_safe (if this is true).  Here's
a patch for that:


--- mysql.old	2010-05-28 20:30:48.094294715 +0100
+++ mysql	2010-05-28 20:42:57.579294181 +0100
@@ -17,7 +17,7 @@
 set -u
 ${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
 
-test -x /usr/sbin/mysqld || exit 0
+test -x /usr/bin/mysqld_safe || exit 0
 
 . /lib/lsb/init-functions
 

Regards,
Roger

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (550, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mysql-server-5.1 depends on:
ii  adduser                 3.112            add and remove users and groups
ii  debconf [debconf-2.0]   1.5.32           Debian configuration management sy
ii  libc6                   2.10.2-9         Embedded GNU C Library: Shared lib
ii  libdbi-perl             1.611-1          Perl Database Interface (DBI)
ii  libgcc1                 1:4.4.4-3        GCC support library
ii  libmysqlclient16        5.1.47-1         MySQL database client library
ii  libstdc++6              4.4.4-3          The GNU Standard C++ Library v3
ii  lsb-base                3.2-23.1         Linux Standard Base 3.2 init scrip
pn  mysql-client-5.1        <none>           (no description available)
ii  mysql-common            5.1.47-1         MySQL database common files, e.g. 
ii  mysql-server-core-5.1   5.1.47-1         MySQL database server binaries
ii  passwd                  1:4.1.4.2-1      change and administer password and
ii  perl                    5.10.1-12        Larry Wall's Practical Extraction 
ii  psmisc                  22.11-1          utilities that use the proc file s
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages mysql-server-5.1 recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20100314cvs-1 simple mail user agent
ii  libhtml-template-p 2.9-1                 HTML::Template : A module for usin

Versions of packages mysql-server-5.1 suggests:
ii  tinyca                        0.7.5-2    simple graphical program for certi





More information about the pkg-mysql-maint mailing list