[debian-mysql] Bug#458798: mysql-server-5.0: Problem with LSB header in init.d script
Petter Reinholdtsen
pere at hungry.com
Wed Jan 2 22:18:56 UTC 2008
Package: mysql-server-5.0
Version: 5.0.24a-5
Severity: important
Tags: patch
User: initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-dependency
When testing dependency based boot sequencing, I discovered a bug in
the init.d script for mysql-server-5.0. With dependency based boot
sequencing, it must be possible to install init.d scripts while
fulfilling their dependencies, and that is not possible with the
init.d scripts mysql, mysql-ndb and mysql-ndb-mgm.
If I understand the intention of the build system, the scripts need to
start during boot in the order mysql-ndb-mgm, mysql-ndb and mysql, and
stop in the opposite order. This mean mysql-ndb depend on
mysql-ndb-mgm, mysql depend mysql-ndb and mysql-ndb-mgm depend on
neither.
I also cleaned up some of the other dependencies, as it is no need to
depend on $local_fs if one already depend on $remote_fs, and moved
$remote_fs into a required dependency as all the script need a mounted
/usr/ both to start and stop.
I'm setting severity important, as this bug make it impossible to
install mysql-server-5.0 when dependency based boot sequencing is
enabled, and impossible to enable dependency based boot sequencing
when mysql-server-5.0 is installed.
This patch implement the solution.
diff -ur mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql.init mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql.init
--- mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql.init 2008-01-02 22:49:36.000000000 +0100
+++ mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql.init 2008-01-02 23:10:23.000000000 +0100
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql
-# Required-Start: $syslog mysql-ndb-mgm
-# Required-Stop: $syslog
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog mysql-ndb
+# Required-Stop: $remote_fs $syslog mysql-ndb
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database server daemon
diff -ur mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql-ndb.init mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql-ndb.init
--- mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql-ndb.init 2008-01-02 22:49:36.000000000 +0100
+++ mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql-ndb.init 2008-01-02 23:10:09.000000000 +0100
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql-ndb
-# Required-Start: $syslog mysql mysql-ndb-mgm
-# Required-Stop: $syslog mysql mysql-ndb-mgm
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog mysql-ndb-mgm
+# Required-Stop: $remote_fs $syslog mysql-ndb-mgm
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database cluster server daemon
diff -ur mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql-ndb-mgm.init mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql-ndb-mgm.init
--- mysql-dfsg-5.0-5.0.51.orig/debian/mysql-server-5.0.mysql-ndb-mgm.init 2008-01-02 22:49:36.000000000 +0100
+++ mysql-dfsg-5.0-5.0.51/debian/mysql-server-5.0.mysql-ndb-mgm.init 2008-01-02 23:09:33.000000000 +0100
@@ -2,10 +2,10 @@
#
### BEGIN INIT INFO
# Provides: mysql-ndb-mgm
-# Required-Start: $syslog
-# Required-Stop: $syslog mysql
-# Should-Start: $local_fs $remote_fs $network $named $time
-# Should-Stop: $local_fs $remote_fs $network $named $time
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start: $network $named $time
+# Should-Stop: $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database cluster management daemon
Happy hacking,
--
Petter Reinholdtsen
More information about the pkg-mysql-maint
mailing list